6 #include "StudyData_Object.h"
7 #include "StudyData_Operation.h"
8 #include "StudyData_XAO.h"
10 #include <Standard_Failure.hxx>
11 #include <Standard_ErrorHandler.hxx>
14 static PyObject* setOCCException(Standard_Failure& ex)
16 std::string msg(ex.DynamicType()->Name());
17 if ( ex.GetMessageString() && strlen( ex.GetMessageString() )) {
19 msg += ex.GetMessageString();
21 PyErr_SetString(PyExc_Exception, msg.c_str() );
31 catch (Standard_Failure& ex) {
32 return setOCCException(ex);
34 catch (std::exception& ex) {
35 PyErr_SetString(PyExc_Exception, ex.what() );
40 // standard definitions
42 %include "std_string.i"
45 #define StudyData_EXPORT
47 %include "StudyData_Object.h"
48 %include "StudyData_Operation.h"
49 %include "StudyData_XAO.h"
51 %template(LongList) std::list<long>;
52 %template(PtrsList) std::list<long long>;
53 %template(DoublList) std::list<double>;