summaryrefslogtreecommitdiffstats
path: root/src/sp-lpe-item.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-06-14 16:25:16 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-06-14 16:25:16 +0000
commitcf5a243070e32b9b68f7fac9e124bb955ccc938a (patch)
treecafb42f2678dd653087051c99e22cba529271b8b /src/sp-lpe-item.cpp
parentfix typo in feed_path_to_cairo, potential bug (diff)
downloadinkscape-cf5a243070e32b9b68f7fac9e124bb955ccc938a.tar.gz
inkscape-cf5a243070e32b9b68f7fac9e124bb955ccc938a.zip
put exception catch block around all doEffect calls. (so in SP_LPE_ITEM)
(bzr r5938)
Diffstat (limited to 'src/sp-lpe-item.cpp')
-rw-r--r--src/sp-lpe-item.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index 470e97d19..abcf00ad2 100644
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
@@ -29,6 +29,9 @@
#include "sp-lpe-item.h"
#include "xml/repr.h"
#include "uri.h"
+#include "message-stack.h"
+#include "inkscape.h"
+#include "desktop.h"
#include <algorithm>
@@ -299,7 +302,14 @@ void sp_lpe_item_perform_path_effect(SPLPEItem *lpeitem, SPCurve *curve) {
lpe->doBeforeEffect(lpeitem);
}
- lpe->doEffect(curve);
+ try {
+ lpe->doEffect(curve);
+ }
+ catch (std::exception & e) {
+ g_warning("Exception during LPE %s execution. \n %s", lpe->getName().c_str(), e.what());
+ SP_ACTIVE_DESKTOP->messageStack()->flash( Inkscape::WARNING_MESSAGE,
+ _("An exception occurred during execution of the Path Effect.") );
+ }
}
}
}