2 // Created : Fri Apr 28 17:36:20 2017
3 // Author : Edward AGAPOV (eap)
8 #include "FrontTrack.hxx"
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() );
32 catch (Standard_Failure& ex) {
33 return setOCCException(ex);
35 catch (std::exception& ex) {
36 PyErr_SetString(PyExc_Exception, ex.what() );
41 %include <std_string.i>
42 %include <std_vector.i>
44 %template(svec) std::vector<std::string>;
46 //%feature("autodoc", "1");
47 //%feature("docstring");
49 %include "FrontTrack.hxx"