From 3bd569252cd9b2d38b0f0da2f2a2c17e54ed0ac1 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 5 Jun 2012 13:55:56 +0200 Subject: [PATCH] Raise exception in Drawing module for unsupported objects --- src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp b/src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp index 07aa2c471..a4cb65ef9 100644 --- a/src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp +++ b/src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp @@ -139,6 +139,10 @@ exporter(PyObject *self, PyObject *args) str_out.close(); break; } + else { + PyErr_SetString(PyExc_TypeError, "Export as SVG of this object type is not supported by Drawing module"); + return 0; + } } } } PY_CATCH;