diff options
| author | Jabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es> | 2017-12-01 19:58:51 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es> | 2017-12-01 19:58:51 +0000 |
| commit | 07cf3b8481f98d075278020f0f9a6a806c8438f8 (patch) | |
| tree | 216dbf8a72e697302ae55afc698ccee5860b3a20 /src/extension/implementation/script.cpp | |
| parent | Working on continuous paths (diff) | |
| parent | Add a warning dialog for previous commit (diff) | |
| download | inkscape-07cf3b8481f98d075278020f0f9a6a806c8438f8.tar.gz inkscape-07cf3b8481f98d075278020f0f9a6a806c8438f8.zip | |
Merge branch 'master' into powerpencilII
Diffstat (limited to 'src/extension/implementation/script.cpp')
| -rw-r--r-- | src/extension/implementation/script.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index eb98711bc..0f0a79bfb 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -732,9 +732,18 @@ void Script::effect(Inkscape::Extension::Effect *module, SPDocument * mydoc = NULL; if (data_read > 10) { - mydoc = Inkscape::Extension::open( - Inkscape::Extension::db.get(SP_MODULE_KEY_INPUT_SVG), - tempfilename_out.c_str()); + try { + mydoc = Inkscape::Extension::open( + Inkscape::Extension::db.get(SP_MODULE_KEY_INPUT_SVG), + tempfilename_out.c_str()); + } catch (const Inkscape::Extension::Input::open_failed &e) { + g_warning("Extension returned output that could not be parsed: %s", e.what()); + Gtk::MessageDialog warning( + _("The output from the extension could not be parsed."), + false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK, true); + warning.set_transient_for( *(INKSCAPE.active_desktop()->getToplevel()) ); + warning.run(); + } } // data_read pump_events(); |
