From 2b8d9986140cc36ea6c0a3c3b88571983490e0ef Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Fri, 22 Dec 2017 19:55:07 +0100 Subject: Allow extensions to throw more fine-grained exceptions This allows to tell the user something more helpful than "File could not be saved" (leaving the reason open for speculation). The former implementation somehow grew to only ever throw Inkscape::Extension::Output::save_failed for any exception that occurred (which did not really matter as we did not throw anything else but certainly wasn't very useful either). Questionable throwing behavior was introduced in commits trying to workaround other issues: - output.cpp a874b82b41c08fc1738b449d400fcc6aeb85d72a - system.cpp d8d60c60ebeeefb068d9b68bf7d96f1f1f88518a --- src/extension/output.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/extension/output.cpp') diff --git a/src/extension/output.cpp b/src/extension/output.cpp index 83f0fed2f..ccfee2c14 100644 --- a/src/extension/output.cpp +++ b/src/extension/output.cpp @@ -213,12 +213,7 @@ Output::prefs (void) void Output::save(SPDocument *doc, gchar const *filename) { - try { - imp->save(this, doc, filename); - } - catch (...) { - throw Inkscape::Extension::Output::save_failed(); - } + imp->save(this, doc, filename); return; } -- cgit v1.2.3