Replace Base::Exception with appropriate subclass

This commit is contained in:
wmayer
2018-11-14 19:45:20 +01:00
parent b0247d184e
commit e02695b91f
28 changed files with 273 additions and 196 deletions

View File

@@ -23,6 +23,7 @@
#include <Base/Console.h>
#include <Base/Interpreter.h>
#include <Base/Parameter.h>
#include <Base/ExceptionFactory.h>
#include <App/Application.h>
@@ -246,6 +247,11 @@ PyMOD_INIT_FUNC(Part)
Py::Object module(partModule);
module.setAttr("OCC_VERSION", Py::String(OCC_VERSION_STRING_EXT));
// C++ exceptions
new Base::ExceptionProducer<Part::NullShapeException>;
new Base::ExceptionProducer<Part::AttachEngineException>;
new Base::ExceptionProducer<Part::BooleanException>;
// Python exceptions
//
PyObject* OCCError = 0;