6 #include "StudyData_Object.h"
7 #include "StudyData_Operation.h"
9 #include <Standard_Failure.hxx>
10 #include <Standard_ErrorHandler.hxx>
13 static PyObject* setOCCException(Standard_Failure& ex)
15 std::string msg(ex.DynamicType()->Name());
16 if ( ex.GetMessageString() && strlen( ex.GetMessageString() )) {
18 msg += ex.GetMessageString();
20 PyErr_SetString(PyExc_Exception, msg.c_str() );
30 catch (Standard_Failure& ex) {
31 return setOCCException(ex);
33 catch (std::exception& ex) {
34 PyErr_SetString(PyExc_Exception, ex.what() );
39 // standard definitions
41 %include "std_string.i"
44 #define StudyData_EXPORT
46 %include "StudyData_Object.h"
47 %include "StudyData_Operation.h"
49 %template(LongList) std::list<long>;
50 %template(PtrsList) std::list<long long>;
51 %template(DoublList) std::list<double>;