diff --git a/Wrap/Swig/commons.i b/Wrap/Swig/commons.i index 2863fd9634ec1ac4aa035767918b83e6cb1c4f4f..deea3b45d8234fdd9657a561f3790d2556aa9884 100644 --- a/Wrap/Swig/commons.i +++ b/Wrap/Swig/commons.i @@ -44,3 +44,18 @@ %template(map_string_double_t) std::map<std::string, double>; %template(pvacuum_double_t) std::pair<double, double>; %template(vector_pvacuum_double_t) std::vector<std::pair<double, double>>; + +// Automatic exception handling: Convert C++ exceptions to Python exceptions; +// see <https://www.swig.org/Doc4.1/Library.html#Library_stl_exceptions> + +%include "exception.i" + +%exception { + try { + $action + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg {"BornAgain C++ Exception: " + std::string(ex.what())}; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } +} diff --git a/auto/Wrap/libBornAgainBase_wrap.cpp b/auto/Wrap/libBornAgainBase_wrap.cpp index e9cdd8146ce1d480ab5865536e04b16918ee4952..fe9ab19600e3ade7f7e74287a3691f2bf705a31a 100644 --- a/auto/Wrap/libBornAgainBase_wrap.cpp +++ b/auto/Wrap/libBornAgainBase_wrap.cpp @@ -9641,7 +9641,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble1d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble1d_t" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -11495,7 +11505,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble2d_t" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -13319,7 +13339,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_integer_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_integer_t" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -15173,7 +15203,17 @@ SWIGINTERN PyObject *_wrap_delete_vinteger2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vinteger2d_t" "', argument " "1"" of type '" "std::vector< std::vector< int > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -16997,7 +17037,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_longinteger_t(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_longinteger_t" "', argument " "1"" of type '" "std::vector< unsigned long > *""'"); } arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -18821,7 +18871,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_complex_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_complex_t" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -20675,7 +20735,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_string_t(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_string_t" "', argument " "1"" of type '" "std::vector< std::string > *""'"); } arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -21884,7 +21954,17 @@ SWIGINTERN PyObject *_wrap_delete_map_string_double_t(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_string_double_t" "', argument " "1"" of type '" "std::map< std::string,double > *""'"); } arg1 = reinterpret_cast< std::map< std::string,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22137,7 +22217,17 @@ SWIGINTERN PyObject *_wrap_delete_pvacuum_double_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pvacuum_double_t" "', argument " "1"" of type '" "std::pair< double,double > *""'"); } arg1 = reinterpret_cast< std::pair< double,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -23991,7 +24081,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_pvacuum_double_t(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_pvacuum_double_t" "', argument " "1"" of type '" "std::vector< std::pair< double,double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24039,7 +24139,17 @@ SWIGINTERN PyObject *_wrap_mul_I(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "mul_I" "', argument " "1"" of type '" "complex_t""'"); } arg1 = static_cast< complex_t >(val1); - result = mul_I(SWIG_STD_MOVE(arg1)); + { + try { + result = mul_I(SWIG_STD_MOVE(arg1)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -24062,7 +24172,17 @@ SWIGINTERN PyObject *_wrap_exp_I(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "exp_I" "', argument " "1"" of type '" "complex_t""'"); } arg1 = static_cast< complex_t >(val1); - result = exp_I(SWIG_STD_MOVE(arg1)); + { + try { + result = exp_I(SWIG_STD_MOVE(arg1)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -24085,7 +24205,17 @@ SWIGINTERN PyObject *_wrap_isfinite(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "isfinite" "', argument " "1"" of type '" "complex_t""'"); } arg1 = static_cast< complex_t >(val1); - result = (bool)isfinite(SWIG_STD_MOVE(arg1)); + { + try { + result = (bool)isfinite(SWIG_STD_MOVE(arg1)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24107,7 +24237,17 @@ SWIGINTERN PyObject *_wrap_delete_ICloneable(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ICloneable" "', argument " "1"" of type '" "ICloneable *""'"); } arg1 = reinterpret_cast< ICloneable * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24130,7 +24270,17 @@ SWIGINTERN PyObject *_wrap_ICloneable_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ICloneable_clone" "', argument " "1"" of type '" "ICloneable const *""'"); } arg1 = reinterpret_cast< ICloneable * >(argp1); - result = (ICloneable *)((ICloneable const *)arg1)->clone(); + { + try { + result = (ICloneable *)((ICloneable const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ICloneable, 0 | 0 ); return resultobj; fail: @@ -24152,7 +24302,17 @@ SWIGINTERN PyObject *_wrap_ICloneable_transferToCPP(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ICloneable_transferToCPP" "', argument " "1"" of type '" "ICloneable *""'"); } arg1 = reinterpret_cast< ICloneable * >(argp1); - (arg1)->transferToCPP(); + { + try { + (arg1)->transferToCPP(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24172,7 +24332,17 @@ SWIGINTERN PyObject *_wrap_new_Span__SWIG_0(PyObject *self, Py_ssize_t nobjs, Py Span *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Span *)new Span(); + { + try { + result = (Span *)new Span(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Span, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24201,7 +24371,17 @@ SWIGINTERN PyObject *_wrap_new_Span__SWIG_1(PyObject *self, Py_ssize_t nobjs, Py SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Span" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Span *)new Span(arg1,arg2); + { + try { + result = (Span *)new Span(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Span, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24268,7 +24448,17 @@ SWIGINTERN PyObject *_wrap_Span___add__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Span___add__" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Span const *)arg1)->operator +(arg2); + { + try { + result = ((Span const *)arg1)->operator +(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Span(result)), SWIGTYPE_p_Span, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24293,7 +24483,17 @@ SWIGINTERN PyObject *_wrap_Span_low(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Span_low" "', argument " "1"" of type '" "Span const *""'"); } arg1 = reinterpret_cast< Span * >(argp1); - result = (double)((Span const *)arg1)->low(); + { + try { + result = (double)((Span const *)arg1)->low(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24316,7 +24516,17 @@ SWIGINTERN PyObject *_wrap_Span_hig(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Span_hig" "', argument " "1"" of type '" "Span const *""'"); } arg1 = reinterpret_cast< Span * >(argp1); - result = (double)((Span const *)arg1)->hig(); + { + try { + result = (double)((Span const *)arg1)->hig(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24346,7 +24556,17 @@ SWIGINTERN PyObject *_wrap_Span_contains(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Span_contains" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (bool)((Span const *)arg1)->contains(arg2); + { + try { + result = (bool)((Span const *)arg1)->contains(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24369,7 +24589,17 @@ SWIGINTERN PyObject *_wrap_Span_pair(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Span_pair" "', argument " "1"" of type '" "Span const *""'"); } arg1 = reinterpret_cast< Span * >(argp1); - result = ((Span const *)arg1)->pair(); + { + try { + result = ((Span const *)arg1)->pair(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::pair< double,double > >(result)); return resultobj; fail: @@ -24405,7 +24635,17 @@ SWIGINTERN PyObject *_wrap_Span_unite(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Span_unite" "', argument " "2"" of type '" "Span const &""'"); } arg2 = reinterpret_cast< Span * >(argp2); - result = Span::unite((Span const &)*arg1,(Span const &)*arg2); + { + try { + result = Span::unite((Span const &)*arg1,(Span const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Span(result)), SWIGTYPE_p_Span, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24427,7 +24667,17 @@ SWIGINTERN PyObject *_wrap_delete_Span(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Span" "', argument " "1"" of type '" "Span *""'"); } arg1 = reinterpret_cast< Span * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24607,7 +24857,17 @@ SWIGINTERN PyObject *_wrap_new_ThreadInfo(PyObject *self, PyObject *args) { ThreadInfo *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_ThreadInfo", 0, 0, 0)) SWIG_fail; - result = (ThreadInfo *)new ThreadInfo(); + { + try { + result = (ThreadInfo *)new ThreadInfo(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ThreadInfo, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24629,7 +24889,17 @@ SWIGINTERN PyObject *_wrap_delete_ThreadInfo(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ThreadInfo" "', argument " "1"" of type '" "ThreadInfo *""'"); } arg1 = reinterpret_cast< ThreadInfo * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24803,7 +25073,17 @@ SWIGINTERN PyObject *_wrap_rad2deg(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rad2deg" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (double)Units::rad2deg(arg1); + { + try { + result = (double)Units::rad2deg(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24826,7 +25106,17 @@ SWIGINTERN PyObject *_wrap_deg2rad(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "deg2rad" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (double)Units::deg2rad(arg1); + { + try { + result = (double)Units::deg2rad(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24852,7 +25142,17 @@ SWIGINTERN PyObject *_wrap_theta(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "theta" "', argument " "1"" of type '" "R3 const &""'"); } arg1 = reinterpret_cast< R3 * >(argp1); - result = (double)R3Util::theta((Vec3< double > const &)*arg1); + { + try { + result = (double)R3Util::theta((Vec3< double > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24878,7 +25178,17 @@ SWIGINTERN PyObject *_wrap_phi(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "phi" "', argument " "1"" of type '" "R3 const &""'"); } arg1 = reinterpret_cast< R3 * >(argp1); - result = (double)R3Util::phi((Vec3< double > const &)*arg1); + { + try { + result = (double)R3Util::phi((Vec3< double > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24904,7 +25214,17 @@ SWIGINTERN PyObject *_wrap_cosTheta(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cosTheta" "', argument " "1"" of type '" "R3 const &""'"); } arg1 = reinterpret_cast< R3 * >(argp1); - result = (double)R3Util::cosTheta((Vec3< double > const &)*arg1); + { + try { + result = (double)R3Util::cosTheta((Vec3< double > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24930,7 +25250,17 @@ SWIGINTERN PyObject *_wrap_sin2Theta(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sin2Theta" "', argument " "1"" of type '" "R3 const &""'"); } arg1 = reinterpret_cast< R3 * >(argp1); - result = (double)R3Util::sin2Theta((Vec3< double > const &)*arg1); + { + try { + result = (double)R3Util::sin2Theta((Vec3< double > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24966,7 +25296,17 @@ SWIGINTERN PyObject *_wrap_angle(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "angle" "', argument " "2"" of type '" "R3 const &""'"); } arg2 = reinterpret_cast< R3 * >(argp2); - result = (double)R3Util::angle((Vec3< double > const &)*arg1,(Vec3< double > const &)*arg2); + { + try { + result = (double)R3Util::angle((Vec3< double > const &)*arg1,(Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24996,7 +25336,17 @@ SWIGINTERN PyObject *_wrap_Bin1D_FromTo(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bin1D_FromTo" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = Bin1D::FromTo(arg1,arg2); + { + try { + result = Bin1D::FromTo(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Bin1D(result)), SWIGTYPE_p_Bin1D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25017,7 +25367,17 @@ SWIGINTERN PyObject *_wrap_Bin1D_At__SWIG_0(PyObject *self, Py_ssize_t nobjs, Py SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Bin1D_At" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = Bin1D::At(arg1); + { + try { + result = Bin1D::At(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Bin1D(result)), SWIGTYPE_p_Bin1D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25046,7 +25406,17 @@ SWIGINTERN PyObject *_wrap_Bin1D_At__SWIG_1(PyObject *self, Py_ssize_t nobjs, Py SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bin1D_At" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = Bin1D::At(arg1,arg2); + { + try { + result = Bin1D::At(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Bin1D(result)), SWIGTYPE_p_Bin1D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25113,7 +25483,17 @@ SWIGINTERN PyObject *_wrap_Bin1D_lowerBound(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_lowerBound" "', argument " "1"" of type '" "Bin1D const *""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); - result = (double)((Bin1D const *)arg1)->lowerBound(); + { + try { + result = (double)((Bin1D const *)arg1)->lowerBound(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25136,7 +25516,17 @@ SWIGINTERN PyObject *_wrap_Bin1D_upperBound(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_upperBound" "', argument " "1"" of type '" "Bin1D const *""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); - result = (double)((Bin1D const *)arg1)->upperBound(); + { + try { + result = (double)((Bin1D const *)arg1)->upperBound(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25159,7 +25549,17 @@ SWIGINTERN PyObject *_wrap_Bin1D_center(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_center" "', argument " "1"" of type '" "Bin1D const *""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); - result = (double)((Bin1D const *)arg1)->center(); + { + try { + result = (double)((Bin1D const *)arg1)->center(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25182,7 +25582,17 @@ SWIGINTERN PyObject *_wrap_Bin1D_binSize(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_binSize" "', argument " "1"" of type '" "Bin1D const *""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); - result = (double)((Bin1D const *)arg1)->binSize(); + { + try { + result = (double)((Bin1D const *)arg1)->binSize(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25215,7 +25625,17 @@ SWIGINTERN PyObject *_wrap_Bin1D___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bin1D___eq__" "', argument " "2"" of type '" "Bin1D const &""'"); } arg2 = reinterpret_cast< Bin1D * >(argp2); - result = (bool)((Bin1D const *)arg1)->operator ==((Bin1D const &)*arg2); + { + try { + result = (bool)((Bin1D const *)arg1)->operator ==((Bin1D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25255,7 +25675,17 @@ SWIGINTERN PyObject *_wrap_Bin1D_clipped_or_nil(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Bin1D_clipped_or_nil" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = ((Bin1D const *)arg1)->clipped_or_nil(arg2,arg3); + { + try { + result = ((Bin1D const *)arg1)->clipped_or_nil(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::optional< Bin1D >(result)), SWIGTYPE_p_std__optionalT_Bin1D_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25277,7 +25707,17 @@ SWIGINTERN PyObject *_wrap_delete_Bin1D(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bin1D" "', argument " "1"" of type '" "Bin1D *""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25319,7 +25759,17 @@ SWIGINTERN PyObject *_wrap_new_Scale(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Scale" "', argument " "2"" of type '" "std::vector< Bin1D,std::allocator< Bin1D > > const &""'"); } arg2 = reinterpret_cast< std::vector< Bin1D,std::allocator< Bin1D > > * >(argp2); - result = (Scale *)new Scale(arg1,(std::vector< Bin1D,std::allocator< Bin1D > > const &)*arg2); + { + try { + result = (Scale *)new Scale(arg1,(std::vector< Bin1D,std::allocator< Bin1D > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25342,7 +25792,17 @@ SWIGINTERN PyObject *_wrap_Scale_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_clone" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (Scale *)((Scale const *)arg1)->clone(); + { + try { + result = (Scale *)((Scale const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, 0 | 0 ); return resultobj; fail: @@ -25373,7 +25833,17 @@ SWIGINTERN PyObject *_wrap_Scale_setAxisName(PyObject *self, PyObject *args) { arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - (arg1)->setAxisName(arg2); + { + try { + (arg1)->setAxisName(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25396,7 +25866,17 @@ SWIGINTERN PyObject *_wrap_Scale_axisName(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_axisName" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = ((Scale const *)arg1)->axisName(); + { + try { + result = ((Scale const *)arg1)->axisName(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -25419,7 +25899,17 @@ SWIGINTERN PyObject *_wrap_Scale_size(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_size" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = ((Scale const *)arg1)->size(); + { + try { + result = ((Scale const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -25442,7 +25932,17 @@ SWIGINTERN PyObject *_wrap_Scale_min(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_min" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (double)((Scale const *)arg1)->min(); + { + try { + result = (double)((Scale const *)arg1)->min(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25465,7 +25965,17 @@ SWIGINTERN PyObject *_wrap_Scale_max(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_max" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (double)((Scale const *)arg1)->max(); + { + try { + result = (double)((Scale const *)arg1)->max(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25488,7 +25998,17 @@ SWIGINTERN PyObject *_wrap_Scale_bounds(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_bounds" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = ((Scale const *)arg1)->bounds(); + { + try { + result = ((Scale const *)arg1)->bounds(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::pair< double,double > >(result)); return resultobj; fail: @@ -25518,7 +26038,17 @@ SWIGINTERN PyObject *_wrap_Scale_rangeComprises(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Scale_rangeComprises" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (bool)((Scale const *)arg1)->rangeComprises(arg2); + { + try { + result = (bool)((Scale const *)arg1)->rangeComprises(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25541,7 +26071,17 @@ SWIGINTERN PyObject *_wrap_Scale_span(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_span" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (double)((Scale const *)arg1)->span(); + { + try { + result = (double)((Scale const *)arg1)->span(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25564,7 +26104,17 @@ SWIGINTERN PyObject *_wrap_Scale_center(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_center" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (double)((Scale const *)arg1)->center(); + { + try { + result = (double)((Scale const *)arg1)->center(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25594,7 +26144,17 @@ SWIGINTERN PyObject *_wrap_Scale_bin(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Scale_bin" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (Bin1D *) &((Scale const *)arg1)->bin(arg2); + { + try { + result = (Bin1D *) &((Scale const *)arg1)->bin(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bin1D, 0 | 0 ); return resultobj; fail: @@ -25624,7 +26184,17 @@ SWIGINTERN PyObject *_wrap_Scale_binCenter(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Scale_binCenter" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (double)((Scale const *)arg1)->binCenter(arg2); + { + try { + result = (double)((Scale const *)arg1)->binCenter(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25647,7 +26217,17 @@ SWIGINTERN PyObject *_wrap_Scale_bins(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_bins" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (std::vector< Bin1D,std::allocator< Bin1D > > *) &((Scale const *)arg1)->bins(); + { + try { + result = (std::vector< Bin1D,std::allocator< Bin1D > > *) &((Scale const *)arg1)->bins(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Bin1D_std__allocatorT_Bin1D_t_t, 0 | 0 ); return resultobj; fail: @@ -25670,7 +26250,17 @@ SWIGINTERN PyObject *_wrap_Scale_binCenters(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_binCenters" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = ((Scale const *)arg1)->binCenters(); + { + try { + result = ((Scale const *)arg1)->binCenters(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -25700,7 +26290,17 @@ SWIGINTERN PyObject *_wrap_Scale_closestIndex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Scale_closestIndex" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Scale const *)arg1)->closestIndex(arg2); + { + try { + result = ((Scale const *)arg1)->closestIndex(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -25723,7 +26323,17 @@ SWIGINTERN PyObject *_wrap_Scale_isEquiDivision(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_isEquiDivision" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (bool)((Scale const *)arg1)->isEquiDivision(); + { + try { + result = (bool)((Scale const *)arg1)->isEquiDivision(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25746,7 +26356,17 @@ SWIGINTERN PyObject *_wrap_Scale_isScan(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_isScan" "', argument " "1"" of type '" "Scale const *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (bool)((Scale const *)arg1)->isScan(); + { + try { + result = (bool)((Scale const *)arg1)->isScan(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25783,7 +26403,17 @@ SWIGINTERN PyObject *_wrap_Scale_clipped__SWIG_0(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Scale_clipped" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = ((Scale const *)arg1)->clipped(arg2,arg3); + { + try { + result = ((Scale const *)arg1)->clipped(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Scale(result)), SWIGTYPE_p_Scale, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25814,7 +26444,17 @@ SWIGINTERN PyObject *_wrap_Scale_clipped__SWIG_1(PyObject *self, Py_ssize_t nobj arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = ((Scale const *)arg1)->clipped(arg2); + { + try { + result = ((Scale const *)arg1)->clipped(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Scale(result)), SWIGTYPE_p_Scale, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25899,7 +26539,17 @@ SWIGINTERN PyObject *_wrap_Scale___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Scale___eq__" "', argument " "2"" of type '" "Scale const &""'"); } arg2 = reinterpret_cast< Scale * >(argp2); - result = (bool)((Scale const *)arg1)->operator ==((Scale const &)*arg2); + { + try { + result = (bool)((Scale const *)arg1)->operator ==((Scale const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25923,7 +26573,17 @@ SWIGINTERN PyObject *_wrap_delete_Scale(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Scale" "', argument " "1"" of type '" "Scale *""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25974,7 +26634,17 @@ SWIGINTERN PyObject *_wrap_ListScan(PyObject *self, PyObject *args) { } arg2 = ptr; } - result = ListScan((std::string const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + { + try { + result = ListScan((std::string const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Scale(result)), SWIGTYPE_p_Scale, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; if (SWIG_IsNewObj(res2)) delete arg2; @@ -26029,7 +26699,17 @@ SWIGINTERN PyObject *_wrap_EquiDivision(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EquiDivision" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = EquiDivision((std::string const &)*arg1,SWIG_STD_MOVE(arg2),arg3,arg4); + { + try { + result = EquiDivision((std::string const &)*arg1,SWIG_STD_MOVE(arg2),arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Scale(result)), SWIGTYPE_p_Scale, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -26063,7 +26743,17 @@ SWIGINTERN PyObject *_wrap_new_Frame(PyObject *self, PyObject *args) { } arg1 = reinterpret_cast< std::vector< Scale const *,std::allocator< Scale const * > > * >(argp1); rvrdeleter1.reset(arg1); - result = (Frame *)new Frame((std::vector< Scale const *,std::allocator< Scale const * > > &&)*arg1); + { + try { + result = (Frame *)new Frame((std::vector< Scale const *,std::allocator< Scale const * > > &&)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Frame, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26085,7 +26775,17 @@ SWIGINTERN PyObject *_wrap_delete_Frame(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Frame" "', argument " "1"" of type '" "Frame *""'"); } arg1 = reinterpret_cast< Frame * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26108,7 +26808,17 @@ SWIGINTERN PyObject *_wrap_Frame_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Frame_clone" "', argument " "1"" of type '" "Frame const *""'"); } arg1 = reinterpret_cast< Frame * >(argp1); - result = (Frame *)((Frame const *)arg1)->clone(); + { + try { + result = (Frame *)((Frame const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Frame, 0 | 0 ); return resultobj; fail: @@ -26131,7 +26841,17 @@ SWIGINTERN PyObject *_wrap_Frame_rank(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Frame_rank" "', argument " "1"" of type '" "Frame const *""'"); } arg1 = reinterpret_cast< Frame * >(argp1); - result = ((Frame const *)arg1)->rank(); + { + try { + result = ((Frame const *)arg1)->rank(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26154,7 +26874,17 @@ SWIGINTERN PyObject *_wrap_Frame_size(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Frame_size" "', argument " "1"" of type '" "Frame const *""'"); } arg1 = reinterpret_cast< Frame * >(argp1); - result = ((Frame const *)arg1)->size(); + { + try { + result = ((Frame const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26184,7 +26914,17 @@ SWIGINTERN PyObject *_wrap_Frame_projectedSize(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Frame_projectedSize" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((Frame const *)arg1)->projectedSize(arg2); + { + try { + result = ((Frame const *)arg1)->projectedSize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26214,7 +26954,17 @@ SWIGINTERN PyObject *_wrap_Frame_axis(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Frame_axis" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (Scale *) &((Frame const *)arg1)->axis(arg2); + { + try { + result = (Scale *) &((Frame const *)arg1)->axis(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, 0 | 0 ); return resultobj; fail: @@ -26237,7 +26987,17 @@ SWIGINTERN PyObject *_wrap_Frame_xAxis(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Frame_xAxis" "', argument " "1"" of type '" "Frame const *""'"); } arg1 = reinterpret_cast< Frame * >(argp1); - result = (Scale *) &((Frame const *)arg1)->xAxis(); + { + try { + result = (Scale *) &((Frame const *)arg1)->xAxis(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, 0 | 0 ); return resultobj; fail: @@ -26260,7 +27020,17 @@ SWIGINTERN PyObject *_wrap_Frame_yAxis(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Frame_yAxis" "', argument " "1"" of type '" "Frame const *""'"); } arg1 = reinterpret_cast< Frame * >(argp1); - result = (Scale *) &((Frame const *)arg1)->yAxis(); + { + try { + result = (Scale *) &((Frame const *)arg1)->yAxis(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, 0 | 0 ); return resultobj; fail: @@ -26298,7 +27068,17 @@ SWIGINTERN PyObject *_wrap_Frame_projectedCoord(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Frame_projectedCoord" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = (double)((Frame const *)arg1)->projectedCoord(arg2,arg3); + { + try { + result = (double)((Frame const *)arg1)->projectedCoord(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26328,7 +27108,17 @@ SWIGINTERN PyObject *_wrap_Frame_allIndices(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Frame_allIndices" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((Frame const *)arg1)->allIndices(arg2); + { + try { + result = ((Frame const *)arg1)->allIndices(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< int,std::allocator< int > > >(result)); return resultobj; fail: @@ -26366,7 +27156,17 @@ SWIGINTERN PyObject *_wrap_Frame_projectedIndex(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Frame_projectedIndex" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = ((Frame const *)arg1)->projectedIndex(arg2,arg3); + { + try { + result = ((Frame const *)arg1)->projectedIndex(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26399,7 +27199,17 @@ SWIGINTERN PyObject *_wrap_Frame_toGlobalIndex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Frame_toGlobalIndex" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > const &""'"); } arg2 = reinterpret_cast< std::vector< unsigned int,std::allocator< unsigned int > > * >(argp2); - result = ((Frame const *)arg1)->toGlobalIndex((std::vector< unsigned int,std::allocator< unsigned int > > const &)*arg2); + { + try { + result = ((Frame const *)arg1)->toGlobalIndex((std::vector< unsigned int,std::allocator< unsigned int > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26432,7 +27242,17 @@ SWIGINTERN PyObject *_wrap_Frame_hasSameSizes(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Frame_hasSameSizes" "', argument " "2"" of type '" "Frame const &""'"); } arg2 = reinterpret_cast< Frame * >(argp2); - result = (bool)((Frame const *)arg1)->hasSameSizes((Frame const &)*arg2); + { + try { + result = (bool)((Frame const *)arg1)->hasSameSizes((Frame const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26465,7 +27285,17 @@ SWIGINTERN PyObject *_wrap_Frame___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Frame___eq__" "', argument " "2"" of type '" "Frame const &""'"); } arg2 = reinterpret_cast< Frame * >(argp2); - result = (bool)((Frame const *)arg1)->operator ==((Frame const &)*arg2); + { + try { + result = (bool)((Frame const *)arg1)->operator ==((Frame const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26515,7 +27345,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_R3" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + { + try { + result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26528,7 +27368,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< double > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< double > *)new Vec3< double >(); + { + try { + result = (Vec3< double > *)new Vec3< double >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26594,7 +27444,17 @@ SWIGINTERN PyObject *_wrap_R3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_x" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->x(); + { + try { + result = (double)((Vec3< double > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26617,7 +27477,17 @@ SWIGINTERN PyObject *_wrap_R3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_y" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->y(); + { + try { + result = (double)((Vec3< double > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26640,7 +27510,17 @@ SWIGINTERN PyObject *_wrap_R3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_z" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->z(); + { + try { + result = (double)((Vec3< double > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26671,7 +27551,17 @@ SWIGINTERN PyObject *_wrap_R3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setX((double const &)*arg2); + { + try { + (arg1)->setX((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26702,7 +27592,17 @@ SWIGINTERN PyObject *_wrap_R3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setY((double const &)*arg2); + { + try { + (arg1)->setY((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26733,7 +27633,17 @@ SWIGINTERN PyObject *_wrap_R3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setZ((double const &)*arg2); + { + try { + (arg1)->setZ((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26766,7 +27676,17 @@ SWIGINTERN PyObject *_wrap_R3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___iadd__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26799,7 +27719,17 @@ SWIGINTERN PyObject *_wrap_R3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___isub__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26822,7 +27752,17 @@ SWIGINTERN PyObject *_wrap_R3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_conj" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->conj(); + { + try { + result = ((Vec3< double > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26845,7 +27785,17 @@ SWIGINTERN PyObject *_wrap_R3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26868,7 +27818,17 @@ SWIGINTERN PyObject *_wrap_R3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26891,7 +27851,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26914,7 +27884,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26937,7 +27917,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_throw" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26960,7 +27950,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_null" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26983,7 +27983,17 @@ SWIGINTERN PyObject *_wrap_R3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_complex" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->complex(); + { + try { + result = ((Vec3< double > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27006,7 +28016,17 @@ SWIGINTERN PyObject *_wrap_R3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_real" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->real(); + { + try { + result = ((Vec3< double > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27039,7 +28059,17 @@ SWIGINTERN PyObject *_wrap_R3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___eq__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -27074,7 +28104,17 @@ SWIGINTERN PyObject *_wrap_R3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___ne__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -27106,7 +28146,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27136,7 +28186,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27158,7 +28218,17 @@ SWIGINTERN PyObject *_wrap_delete_R3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_R3" "', argument " "1"" of type '" "Vec3< double > *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27206,7 +28276,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_C3" "', argument " "3"" of type '" "std::complex< double >""'"); } arg3 = static_cast< std::complex< double > >(val3); - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27219,7 +28299,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< std::complex< double > > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27285,7 +28375,17 @@ SWIGINTERN PyObject *_wrap_C3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_x" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->x(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -27308,7 +28408,17 @@ SWIGINTERN PyObject *_wrap_C3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_y" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->y(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -27331,7 +28441,17 @@ SWIGINTERN PyObject *_wrap_C3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_z" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->z(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -27362,7 +28482,17 @@ SWIGINTERN PyObject *_wrap_C3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setX((std::complex< double > const &)*arg2); + { + try { + (arg1)->setX((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27393,7 +28523,17 @@ SWIGINTERN PyObject *_wrap_C3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setY((std::complex< double > const &)*arg2); + { + try { + (arg1)->setY((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27424,7 +28564,17 @@ SWIGINTERN PyObject *_wrap_C3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setZ((std::complex< double > const &)*arg2); + { + try { + (arg1)->setZ((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27457,7 +28607,17 @@ SWIGINTERN PyObject *_wrap_C3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___iadd__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27490,7 +28650,17 @@ SWIGINTERN PyObject *_wrap_C3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___isub__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27513,7 +28683,17 @@ SWIGINTERN PyObject *_wrap_C3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_conj" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27536,7 +28716,17 @@ SWIGINTERN PyObject *_wrap_C3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -27559,7 +28749,17 @@ SWIGINTERN PyObject *_wrap_C3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -27582,7 +28782,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -27605,7 +28815,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -27628,7 +28848,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_throw" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27651,7 +28881,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_null" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27674,7 +28914,17 @@ SWIGINTERN PyObject *_wrap_C3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_complex" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27697,7 +28947,17 @@ SWIGINTERN PyObject *_wrap_C3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_real" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->real(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27730,7 +28990,17 @@ SWIGINTERN PyObject *_wrap_C3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___eq__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -27765,7 +29035,17 @@ SWIGINTERN PyObject *_wrap_C3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___ne__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -27797,7 +29077,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27827,7 +29117,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27849,7 +29149,17 @@ SWIGINTERN PyObject *_wrap_delete_C3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_C3" "', argument " "1"" of type '" "Vec3< std::complex< double > > *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index df19730304cd983451ea8d56e186c69e62369c64..76acc21fb40469b64ac19616ded4c4a37e21432e 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -9788,7 +9788,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble1d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble1d_t" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -11642,7 +11652,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble2d_t" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -13466,7 +13486,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_integer_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_integer_t" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -15320,7 +15350,17 @@ SWIGINTERN PyObject *_wrap_delete_vinteger2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vinteger2d_t" "', argument " "1"" of type '" "std::vector< std::vector< int > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -17144,7 +17184,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_longinteger_t(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_longinteger_t" "', argument " "1"" of type '" "std::vector< unsigned long > *""'"); } arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -18968,7 +19018,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_complex_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_complex_t" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -20822,7 +20882,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_string_t(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_string_t" "', argument " "1"" of type '" "std::vector< std::string > *""'"); } arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22031,7 +22101,17 @@ SWIGINTERN PyObject *_wrap_delete_map_string_double_t(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_string_double_t" "', argument " "1"" of type '" "std::map< std::string,double > *""'"); } arg1 = reinterpret_cast< std::map< std::string,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22284,7 +22364,17 @@ SWIGINTERN PyObject *_wrap_delete_pvacuum_double_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pvacuum_double_t" "', argument " "1"" of type '" "std::pair< double,double > *""'"); } arg1 = reinterpret_cast< std::pair< double,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24138,7 +24228,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_pvacuum_double_t(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_pvacuum_double_t" "', argument " "1"" of type '" "std::vector< std::pair< double,double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24186,7 +24286,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_R3" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + { + try { + result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24199,7 +24309,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< double > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< double > *)new Vec3< double >(); + { + try { + result = (Vec3< double > *)new Vec3< double >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24265,7 +24385,17 @@ SWIGINTERN PyObject *_wrap_R3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_x" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->x(); + { + try { + result = (double)((Vec3< double > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24288,7 +24418,17 @@ SWIGINTERN PyObject *_wrap_R3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_y" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->y(); + { + try { + result = (double)((Vec3< double > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24311,7 +24451,17 @@ SWIGINTERN PyObject *_wrap_R3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_z" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->z(); + { + try { + result = (double)((Vec3< double > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24342,7 +24492,17 @@ SWIGINTERN PyObject *_wrap_R3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setX((double const &)*arg2); + { + try { + (arg1)->setX((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24373,7 +24533,17 @@ SWIGINTERN PyObject *_wrap_R3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setY((double const &)*arg2); + { + try { + (arg1)->setY((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24404,7 +24574,17 @@ SWIGINTERN PyObject *_wrap_R3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setZ((double const &)*arg2); + { + try { + (arg1)->setZ((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24437,7 +24617,17 @@ SWIGINTERN PyObject *_wrap_R3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___iadd__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24470,7 +24660,17 @@ SWIGINTERN PyObject *_wrap_R3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___isub__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24493,7 +24693,17 @@ SWIGINTERN PyObject *_wrap_R3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_conj" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->conj(); + { + try { + result = ((Vec3< double > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24516,7 +24726,17 @@ SWIGINTERN PyObject *_wrap_R3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24539,7 +24759,17 @@ SWIGINTERN PyObject *_wrap_R3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24562,7 +24792,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24585,7 +24825,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24608,7 +24858,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_throw" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24631,7 +24891,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_null" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24654,7 +24924,17 @@ SWIGINTERN PyObject *_wrap_R3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_complex" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->complex(); + { + try { + result = ((Vec3< double > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24677,7 +24957,17 @@ SWIGINTERN PyObject *_wrap_R3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_real" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->real(); + { + try { + result = ((Vec3< double > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24710,7 +25000,17 @@ SWIGINTERN PyObject *_wrap_R3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___eq__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24745,7 +25045,17 @@ SWIGINTERN PyObject *_wrap_R3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___ne__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24777,7 +25087,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24807,7 +25127,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24829,7 +25159,17 @@ SWIGINTERN PyObject *_wrap_delete_R3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_R3" "', argument " "1"" of type '" "Vec3< double > *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24877,7 +25217,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_C3" "', argument " "3"" of type '" "std::complex< double >""'"); } arg3 = static_cast< std::complex< double > >(val3); - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24890,7 +25240,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< std::complex< double > > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24956,7 +25316,17 @@ SWIGINTERN PyObject *_wrap_C3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_x" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->x(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -24979,7 +25349,17 @@ SWIGINTERN PyObject *_wrap_C3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_y" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->y(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25002,7 +25382,17 @@ SWIGINTERN PyObject *_wrap_C3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_z" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->z(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25033,7 +25423,17 @@ SWIGINTERN PyObject *_wrap_C3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setX((std::complex< double > const &)*arg2); + { + try { + (arg1)->setX((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25064,7 +25464,17 @@ SWIGINTERN PyObject *_wrap_C3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setY((std::complex< double > const &)*arg2); + { + try { + (arg1)->setY((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25095,7 +25505,17 @@ SWIGINTERN PyObject *_wrap_C3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setZ((std::complex< double > const &)*arg2); + { + try { + (arg1)->setZ((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25128,7 +25548,17 @@ SWIGINTERN PyObject *_wrap_C3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___iadd__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25161,7 +25591,17 @@ SWIGINTERN PyObject *_wrap_C3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___isub__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25184,7 +25624,17 @@ SWIGINTERN PyObject *_wrap_C3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_conj" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25207,7 +25657,17 @@ SWIGINTERN PyObject *_wrap_C3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25230,7 +25690,17 @@ SWIGINTERN PyObject *_wrap_C3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25253,7 +25723,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25276,7 +25756,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25299,7 +25789,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_throw" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25322,7 +25822,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_null" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25345,7 +25855,17 @@ SWIGINTERN PyObject *_wrap_C3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_complex" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25368,7 +25888,17 @@ SWIGINTERN PyObject *_wrap_C3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_real" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->real(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25401,7 +25931,17 @@ SWIGINTERN PyObject *_wrap_C3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___eq__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25436,7 +25976,17 @@ SWIGINTERN PyObject *_wrap_C3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___ne__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25468,7 +26018,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25498,7 +26058,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25520,7 +26090,17 @@ SWIGINTERN PyObject *_wrap_delete_C3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_C3" "', argument " "1"" of type '" "Vec3< std::complex< double > > *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25556,7 +26136,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_iterator(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_iterator" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_Vec3_Sl_double_Sg__Sg__iterator(arg1,arg2); + { + try { + result = (swig::SwigPyIterator *)std_vector_Sl_Vec3_Sl_double_Sg__Sg__iterator(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25579,7 +26169,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___nonzero__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___nonzero__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____nonzero__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____nonzero__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25602,7 +26202,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___bool__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___bool__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____bool__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____bool__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25625,7 +26235,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___len__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___len__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg____len__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg____len__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -25663,12 +26283,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___getslice__(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___getslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -25705,12 +26335,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setslice____SWIG_0(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___setslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -25760,12 +26400,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setslice____SWIG_1(PyObject *self, Py_ssi } arg4 = ptr; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg4); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; @@ -25867,12 +26517,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delslice__(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___delslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -25901,12 +26561,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delitem____SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3___delitem__" "', argument " "2"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::difference_type >(val2); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -25935,12 +26605,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___getitem____SWIG_0(PyObject *self, Py_ssiz } arg2 = (PySliceObject *) swig_obj[1]; } - try { - result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -25981,12 +26661,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_0(PyObject *self, Py_ssiz } arg3 = ptr; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; @@ -26016,12 +26706,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_1(PyObject *self, Py_ssiz } arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26049,12 +26749,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delitem____SWIG_1(PyObject *self, Py_ssiz } arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26129,10 +26839,20 @@ SWIGINTERN PyObject *_wrap_vector_R3___getitem____SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3___getitem__" "', argument " "2"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::difference_type >(val2); - try { - result = (std::vector< Vec3< double > >::value_type *) &std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< Vec3< double > > const *)arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double > >::value_type *) &std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< Vec3< double > > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); @@ -26218,10 +26938,20 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_2(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3___setitem__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26312,10 +27042,20 @@ SWIGINTERN PyObject *_wrap_vector_R3_pop(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_pop" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - try { - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj((new std::vector< Vec3< double > >::value_type(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26348,7 +27088,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_append(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_append" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - std_vector_Sl_Vec3_Sl_double_Sg__Sg__append(arg1,(Vec3< double > const &)*arg2); + { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg__append(arg1,(Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26361,7 +27111,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_0(PyObject *self, Py_ssize_t nobj std::vector< Vec3< double > > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26387,7 +27147,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_1(PyObject *self, Py_ssize_t nobj } arg1 = ptr; } - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >((std::vector< Vec3< double > > const &)*arg1); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >((std::vector< Vec3< double > > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -26412,7 +27182,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_empty(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_empty" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)((std::vector< Vec3< double > > const *)arg1)->empty(); + { + try { + result = (bool)((std::vector< Vec3< double > > const *)arg1)->empty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26435,7 +27215,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_size(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_size" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->size(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26467,7 +27257,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_swap(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_swap" "', argument " "2"" of type '" "std::vector< Vec3< double > > &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > > * >(argp2); - (arg1)->swap(*arg2); + { + try { + (arg1)->swap(*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26490,7 +27290,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_begin(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_begin" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->begin(); + { + try { + result = (arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26514,7 +27324,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_end(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_end" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->end(); + { + try { + result = (arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26538,7 +27358,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_rbegin(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_rbegin" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->rbegin(); + { + try { + result = (arg1)->rbegin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26562,7 +27392,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_rend(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_rend" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->rend(); + { + try { + result = (arg1)->rend(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26585,7 +27425,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_clear(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_clear" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - (arg1)->clear(); + { + try { + (arg1)->clear(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26608,7 +27458,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_get_allocator(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_get_allocator" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->get_allocator(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->get_allocator(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< Vec3< double > >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26629,7 +27489,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_2(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_R3" "', argument " "1"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg1 = static_cast< std::vector< Vec3< double > >::size_type >(val1); - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26651,7 +27521,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_pop_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_pop_back" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - (arg1)->pop_back(); + { + try { + (arg1)->pop_back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26679,7 +27559,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_resize__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3_resize" "', argument " "2"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::size_type >(val2); - (arg1)->resize(arg2); + { + try { + (arg1)->resize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26714,7 +27604,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_erase__SWIG_0(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3_erase" "', argument " "2"" of type '" "std::vector< Vec3< double > >::iterator""'"); } } - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26764,7 +27664,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_erase__SWIG_1(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3_erase" "', argument " "3"" of type '" "std::vector< Vec3< double > >::iterator""'"); } } - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26846,7 +27756,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_3(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vector_R3" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1,(std::vector< Vec3< double > >::value_type const &)*arg2); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1,(std::vector< Vec3< double > >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26933,7 +27853,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_push_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_push_back" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - (arg1)->push_back((std::vector< Vec3< double > >::value_type const &)*arg2); + { + try { + (arg1)->push_back((std::vector< Vec3< double > >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26956,7 +27886,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_front(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_front" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->front(); + { + try { + result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->front(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -26980,7 +27920,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_back" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->back(); + { + try { + result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -27021,7 +27971,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_assign(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_assign" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - (arg1)->assign(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + { + try { + (arg1)->assign(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27060,7 +28020,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_resize__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_resize" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - (arg1)->resize(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + { + try { + (arg1)->resize(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27156,7 +28126,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_insert__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_insert" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27210,7 +28190,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_insert__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_insert" "', argument " "4"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg4 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp4); - std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(Vec3< double > const &)*arg4); + { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(Vec3< double > const &)*arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27297,7 +28287,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_reserve(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3_reserve" "', argument " "2"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::size_type >(val2); - (arg1)->reserve(arg2); + { + try { + (arg1)->reserve(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27320,7 +28320,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_capacity(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_capacity" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->capacity(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->capacity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -27342,7 +28352,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_R3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_R3" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27366,7 +28386,17 @@ SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_0(PyObject *self, Py_ssize_t nobj Datafield *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Datafield *)new Datafield(); + { + try { + result = (Datafield *)new Datafield(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27413,7 +28443,17 @@ SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_1(PyObject *self, Py_ssize_t nobj } arg3 = ptr; } - result = (Datafield *)new Datafield((Frame const *)arg1,(std::vector< double,std::allocator< double > > const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + { + try { + result = (Datafield *)new Datafield((Frame const *)arg1,(std::vector< double,std::allocator< double > > const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res2)) delete arg2; if (SWIG_IsNewObj(res3)) delete arg3; @@ -27451,7 +28491,17 @@ SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_2(PyObject *self, Py_ssize_t nobj } arg2 = ptr; } - result = (Datafield *)new Datafield((Frame const *)arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + { + try { + result = (Datafield *)new Datafield((Frame const *)arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -27474,7 +28524,17 @@ SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_3(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Datafield" "', argument " "1"" of type '" "Frame const *""'"); } arg1 = reinterpret_cast< Frame * >(argp1); - result = (Datafield *)new Datafield((Frame const *)arg1); + { + try { + result = (Datafield *)new Datafield((Frame const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27530,7 +28590,17 @@ SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_4(PyObject *self, Py_ssize_t nobj } arg3 = ptr; } - result = (Datafield *)new Datafield((std::vector< Scale const *,std::allocator< Scale const * > > &&)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + { + try { + result = (Datafield *)new Datafield((std::vector< Scale const *,std::allocator< Scale const * > > &&)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res2)) delete arg2; if (SWIG_IsNewObj(res3)) delete arg3; @@ -27577,7 +28647,17 @@ SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_5(PyObject *self, Py_ssize_t nobj } arg2 = ptr; } - result = (Datafield *)new Datafield((std::vector< Scale const *,std::allocator< Scale const * > > &&)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + { + try { + result = (Datafield *)new Datafield((std::vector< Scale const *,std::allocator< Scale const * > > &&)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -27609,7 +28689,17 @@ SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_6(PyObject *self, Py_ssize_t nobj } arg1 = reinterpret_cast< std::vector< Scale const *,std::allocator< Scale const * > > * >(argp1); rvrdeleter1.reset(arg1); - result = (Datafield *)new Datafield((std::vector< Scale const *,std::allocator< Scale const * > > &&)*arg1); + { + try { + result = (Datafield *)new Datafield((std::vector< Scale const *,std::allocator< Scale const * > > &&)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27633,7 +28723,17 @@ SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_7(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Datafield" "', argument " "1"" of type '" "Datafield const &""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (Datafield *)new Datafield((Datafield const &)*arg1); + { + try { + result = (Datafield *)new Datafield((Datafield const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27663,7 +28763,17 @@ SWIGINTERN PyObject *_wrap_new_Datafield__SWIG_8(PyObject *self, Py_ssize_t nobj } arg1 = reinterpret_cast< Datafield * >(argp1); rvrdeleter1.reset(arg1); - result = (Datafield *)new Datafield((Datafield &&)*arg1); + { + try { + result = (Datafield *)new Datafield((Datafield &&)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27808,7 +28918,17 @@ SWIGINTERN PyObject *_wrap_delete_Datafield(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Datafield" "', argument " "1"" of type '" "Datafield *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27831,7 +28951,17 @@ SWIGINTERN PyObject *_wrap_Datafield_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_clone" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (Datafield *)((Datafield const *)arg1)->clone(); + { + try { + result = (Datafield *)((Datafield const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -27868,7 +28998,17 @@ SWIGINTERN PyObject *_wrap_Datafield_setAt(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Datafield_setAt" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->setAt(arg2,arg3); + { + try { + (arg1)->setAt(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27898,7 +29038,17 @@ SWIGINTERN PyObject *_wrap_Datafield_valAt(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Datafield_valAt" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (double)((Datafield const *)arg1)->valAt(arg2); + { + try { + result = (double)((Datafield const *)arg1)->valAt(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -27921,7 +29071,17 @@ SWIGINTERN PyObject *_wrap_Datafield_frame(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_frame" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (Frame *) &((Datafield const *)arg1)->frame(); + { + try { + result = (Frame *) &((Datafield const *)arg1)->frame(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Frame, 0 | 0 ); return resultobj; fail: @@ -27944,7 +29104,17 @@ SWIGINTERN PyObject *_wrap_Datafield_rank(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_rank" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = ((Datafield const *)arg1)->rank(); + { + try { + result = ((Datafield const *)arg1)->rank(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -27974,7 +29144,17 @@ SWIGINTERN PyObject *_wrap_Datafield_axis(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Datafield_axis" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (Scale *) &((Datafield const *)arg1)->axis(arg2); + { + try { + result = (Scale *) &((Datafield const *)arg1)->axis(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, 0 | 0 ); return resultobj; fail: @@ -27997,7 +29177,17 @@ SWIGINTERN PyObject *_wrap_Datafield_xAxis(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_xAxis" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (Scale *) &((Datafield const *)arg1)->xAxis(); + { + try { + result = (Scale *) &((Datafield const *)arg1)->xAxis(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, 0 | 0 ); return resultobj; fail: @@ -28020,7 +29210,17 @@ SWIGINTERN PyObject *_wrap_Datafield_yAxis(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_yAxis" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (Scale *) &((Datafield const *)arg1)->yAxis(); + { + try { + result = (Scale *) &((Datafield const *)arg1)->yAxis(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, 0 | 0 ); return resultobj; fail: @@ -28043,7 +29243,17 @@ SWIGINTERN PyObject *_wrap_Datafield_size(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_size" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = ((Datafield const *)arg1)->size(); + { + try { + result = ((Datafield const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -28066,7 +29276,17 @@ SWIGINTERN PyObject *_wrap_Datafield_empty(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_empty" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (bool)((Datafield const *)arg1)->empty(); + { + try { + result = (bool)((Datafield const *)arg1)->empty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -28089,7 +29309,17 @@ SWIGINTERN PyObject *_wrap_Datafield_flatVector(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_flatVector" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (std::vector< double,std::allocator< double > > *) &((Datafield const *)arg1)->flatVector(); + { + try { + result = (std::vector< double,std::allocator< double > > *) &((Datafield const *)arg1)->flatVector(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(*result)); return resultobj; fail: @@ -28112,7 +29342,17 @@ SWIGINTERN PyObject *_wrap_Datafield_maxVal(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_maxVal" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (double)((Datafield const *)arg1)->maxVal(); + { + try { + result = (double)((Datafield const *)arg1)->maxVal(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -28135,7 +29375,17 @@ SWIGINTERN PyObject *_wrap_Datafield_minVal(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_minVal" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (double)((Datafield const *)arg1)->minVal(); + { + try { + result = (double)((Datafield const *)arg1)->minVal(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -28164,7 +29414,17 @@ SWIGINTERN PyObject *_wrap_Datafield_scale(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Datafield_scale" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->scale(arg2); + { + try { + (arg1)->scale(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28217,7 +29477,17 @@ SWIGINTERN PyObject *_wrap_Datafield_crop__SWIG_0(PyObject *self, Py_ssize_t nob SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Datafield_crop" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - result = (Datafield *)((Datafield const *)arg1)->crop(arg2,arg3,arg4,arg5); + { + try { + result = (Datafield *)((Datafield const *)arg1)->crop(arg2,arg3,arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -28254,7 +29524,17 @@ SWIGINTERN PyObject *_wrap_Datafield_crop__SWIG_1(PyObject *self, Py_ssize_t nob SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Datafield_crop" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Datafield *)((Datafield const *)arg1)->crop(arg2,arg3); + { + try { + result = (Datafield *)((Datafield const *)arg1)->crop(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -28349,7 +29629,17 @@ SWIGINTERN PyObject *_wrap_Datafield_npArray(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_npArray" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (PyObject *)((Datafield const *)arg1)->npArray(); + { + try { + result = (PyObject *)((Datafield const *)arg1)->npArray(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = result; return resultobj; fail: @@ -28370,7 +29660,17 @@ SWIGINTERN PyObject *_wrap_Datafield_xProjection__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_xProjection" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (Datafield *)((Datafield const *)arg1)->xProjection(); + { + try { + result = (Datafield *)((Datafield const *)arg1)->xProjection(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -28399,7 +29699,17 @@ SWIGINTERN PyObject *_wrap_Datafield_xProjection__SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Datafield_xProjection" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Datafield *)((Datafield const *)arg1)->xProjection(arg2); + { + try { + result = (Datafield *)((Datafield const *)arg1)->xProjection(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -28436,7 +29746,17 @@ SWIGINTERN PyObject *_wrap_Datafield_xProjection__SWIG_2(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Datafield_xProjection" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Datafield *)((Datafield const *)arg1)->xProjection(arg2,arg3); + { + try { + result = (Datafield *)((Datafield const *)arg1)->xProjection(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -28521,7 +29841,17 @@ SWIGINTERN PyObject *_wrap_Datafield_yProjection__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Datafield_yProjection" "', argument " "1"" of type '" "Datafield const *""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = (Datafield *)((Datafield const *)arg1)->yProjection(); + { + try { + result = (Datafield *)((Datafield const *)arg1)->yProjection(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -28550,7 +29880,17 @@ SWIGINTERN PyObject *_wrap_Datafield_yProjection__SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Datafield_yProjection" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Datafield *)((Datafield const *)arg1)->yProjection(arg2); + { + try { + result = (Datafield *)((Datafield const *)arg1)->yProjection(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -28587,7 +29927,17 @@ SWIGINTERN PyObject *_wrap_Datafield_yProjection__SWIG_2(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Datafield_yProjection" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Datafield *)((Datafield const *)arg1)->yProjection(arg2,arg3); + { + try { + result = (Datafield *)((Datafield const *)arg1)->yProjection(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -28702,7 +30052,17 @@ SWIGINTERN PyObject *_wrap_meanRelVecDiff(PyObject *self, PyObject *args) { } arg2 = ptr; } - result = (double)DiffUtil::meanRelVecDiff((std::vector< double,std::allocator< double > > const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + { + try { + result = (double)DiffUtil::meanRelVecDiff((std::vector< double,std::allocator< double > > const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); if (SWIG_IsNewObj(res1)) delete arg1; if (SWIG_IsNewObj(res2)) delete arg2; @@ -28742,7 +30102,17 @@ SWIGINTERN PyObject *_wrap_relativeDifferenceField(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "relativeDifferenceField" "', argument " "2"" of type '" "Datafield const &""'"); } arg2 = reinterpret_cast< Datafield * >(argp2); - result = (Datafield *)DiffUtil::relativeDifferenceField((Datafield const &)*arg1,(Datafield const &)*arg2); + { + try { + result = (Datafield *)DiffUtil::relativeDifferenceField((Datafield const &)*arg1,(Datafield const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); return resultobj; fail: @@ -28778,7 +30148,17 @@ SWIGINTERN PyObject *_wrap_meanRelativeDifference(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meanRelativeDifference" "', argument " "2"" of type '" "SimulationResult const &""'"); } arg2 = reinterpret_cast< SimulationResult * >(argp2); - result = (double)DiffUtil::meanRelativeDifference((SimulationResult const &)*arg1,(SimulationResult const &)*arg2); + { + try { + result = (double)DiffUtil::meanRelativeDifference((SimulationResult const &)*arg1,(SimulationResult const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -28826,7 +30206,17 @@ SWIGINTERN PyObject *_wrap_checkRelativeDifference(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "checkRelativeDifference" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (bool)DiffUtil::checkRelativeDifference((std::vector< double,std::allocator< double > > const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2,arg3); + { + try { + result = (bool)DiffUtil::checkRelativeDifference((std::vector< double,std::allocator< double > > const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); if (SWIG_IsNewObj(res1)) delete arg1; if (SWIG_IsNewObj(res2)) delete arg2; @@ -28865,7 +30255,17 @@ SWIGINTERN PyObject *_wrap_invertAxis(PyObject *self, PyObject *args) { } arg2 = ptr; } - result = DataUtil::Data::invertAxis(arg1,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg2); + { + try { + result = DataUtil::Data::invertAxis(arg1,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -28895,7 +30295,17 @@ SWIGINTERN PyObject *_wrap_transpose(PyObject *self, PyObject *args) { } arg1 = ptr; } - result = DataUtil::Data::transpose((std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg1); + { + try { + result = DataUtil::Data::transpose((std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -28923,7 +30333,17 @@ SWIGINTERN PyObject *_wrap_create2DArrayfromDatafield(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "create2DArrayfromDatafield" "', argument " "1"" of type '" "Datafield const &""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = DataUtil::Data::create2DArrayfromDatafield((Datafield const &)*arg1); + { + try { + result = DataUtil::Data::create2DArrayfromDatafield((Datafield const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); return resultobj; fail: @@ -28949,7 +30369,17 @@ SWIGINTERN PyObject *_wrap_importArrayToDatafield__SWIG_0(PyObject *self, Py_ssi } arg1 = ptr; } - result = (Datafield *)DataUtil::Data::importArrayToDatafield((std::vector< double,std::allocator< double > > const &)*arg1); + { + try { + result = (Datafield *)DataUtil::Data::importArrayToDatafield((std::vector< double,std::allocator< double > > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -28977,7 +30407,17 @@ SWIGINTERN PyObject *_wrap_importArrayToDatafield__SWIG_1(PyObject *self, Py_ssi } arg1 = ptr; } - result = (Datafield *)DataUtil::Data::importArrayToDatafield((std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg1); + { + try { + result = (Datafield *)DataUtil::Data::importArrayToDatafield((std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -29066,7 +30506,17 @@ SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_0(PyObject *self, Py_ssize_t nobjs, P SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FindPeaks" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2,(std::string const &)*arg3,arg4); + { + try { + result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2,(std::string const &)*arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -29113,7 +30563,17 @@ SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_1(PyObject *self, Py_ssize_t nobjs, P } arg3 = ptr; } - result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2,(std::string const &)*arg3); + { + try { + result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2,(std::string const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -29147,7 +30607,17 @@ SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_2(PyObject *self, Py_ssize_t nobjs, P SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FindPeaks" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2); + { + try { + result = DataUtil::Data::FindPeaks((Datafield const &)*arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); return resultobj; fail: @@ -29171,7 +30641,17 @@ SWIGINTERN PyObject *_wrap_FindPeaks__SWIG_3(PyObject *self, Py_ssize_t nobjs, P SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FindPeaks" "', argument " "1"" of type '" "Datafield const &""'"); } arg1 = reinterpret_cast< Datafield * >(argp1); - result = DataUtil::Data::FindPeaks((Datafield const &)*arg1); + { + try { + result = DataUtil::Data::FindPeaks((Datafield const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > >(result)); return resultobj; fail: @@ -29300,7 +30780,17 @@ SWIGINTERN PyObject *_wrap_new_Beam__SWIG_0(PyObject *self, Py_ssize_t nobjs, Py SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Beam" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (Beam *)new Beam(arg1,arg2,arg3,arg4); + { + try { + result = (Beam *)new Beam(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Beam, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29337,7 +30827,17 @@ SWIGINTERN PyObject *_wrap_new_Beam__SWIG_1(PyObject *self, Py_ssize_t nobjs, Py SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Beam" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Beam *)new Beam(arg1,arg2,arg3); + { + try { + result = (Beam *)new Beam(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Beam, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29427,7 +30927,17 @@ SWIGINTERN PyObject *_wrap_delete_Beam(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Beam" "', argument " "1"" of type '" "Beam *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29450,7 +30960,17 @@ SWIGINTERN PyObject *_wrap_Beam_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Beam_className" "', argument " "1"" of type '" "Beam const *""'"); } arg1 = reinterpret_cast< Beam * >(argp1); - result = ((Beam const *)arg1)->className(); + { + try { + result = ((Beam const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -29479,7 +30999,17 @@ SWIGINTERN PyObject *_wrap_Beam_setFootprint(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Beam_setFootprint" "', argument " "2"" of type '" "IFootprint const *""'"); } arg2 = reinterpret_cast< IFootprint * >(argp2); - (arg1)->setFootprint((IFootprint const *)arg2); + { + try { + (arg1)->setFootprint((IFootprint const *)arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29516,7 +31046,17 @@ SWIGINTERN PyObject *_wrap_Beam_setPolarization(PyObject *self, PyObject *args) if (SWIG_IsNewObj(res2)) delete temp; } } - (arg1)->setPolarization(arg2); + { + try { + (arg1)->setPolarization(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29549,7 +31089,17 @@ SWIGINTERN PyObject *_wrap_delete_IFootprint(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IFootprint" "', argument " "1"" of type '" "IFootprint *""'"); } arg1 = reinterpret_cast< IFootprint * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29572,7 +31122,17 @@ SWIGINTERN PyObject *_wrap_IFootprint_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFootprint_clone" "', argument " "1"" of type '" "IFootprint const *""'"); } arg1 = reinterpret_cast< IFootprint * >(argp1); - result = (IFootprint *)((IFootprint const *)arg1)->clone(); + { + try { + result = (IFootprint *)((IFootprint const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IFootprint, 0 | 0 ); return resultobj; fail: @@ -29595,7 +31155,17 @@ SWIGINTERN PyObject *_wrap_IFootprint_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFootprint_parDefs" "', argument " "1"" of type '" "IFootprint const *""'"); } arg1 = reinterpret_cast< IFootprint * >(argp1); - result = ((IFootprint const *)arg1)->parDefs(); + { + try { + result = ((IFootprint const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -29618,7 +31188,17 @@ SWIGINTERN PyObject *_wrap_IFootprint_widthRatio(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFootprint_widthRatio" "', argument " "1"" of type '" "IFootprint const *""'"); } arg1 = reinterpret_cast< IFootprint * >(argp1); - result = (double)((IFootprint const *)arg1)->widthRatio(); + { + try { + result = (double)((IFootprint const *)arg1)->widthRatio(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -29648,7 +31228,17 @@ SWIGINTERN PyObject *_wrap_IFootprint_calculate(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IFootprint_calculate" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((IFootprint const *)arg1)->calculate(arg2); + { + try { + result = (double)((IFootprint const *)arg1)->calculate(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -29671,7 +31261,17 @@ SWIGINTERN PyObject *_wrap_IFootprint_validate(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFootprint_validate" "', argument " "1"" of type '" "IFootprint const *""'"); } arg1 = reinterpret_cast< IFootprint * >(argp1); - result = ((IFootprint const *)arg1)->validate(); + { + try { + result = ((IFootprint const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -29701,7 +31301,17 @@ SWIGINTERN PyObject *_wrap_new_FootprintGauss__SWIG_0(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (FootprintGauss *)new FootprintGauss(arg1); + { + try { + result = (FootprintGauss *)new FootprintGauss(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FootprintGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29722,7 +31332,17 @@ SWIGINTERN PyObject *_wrap_new_FootprintGauss__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FootprintGauss" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (FootprintGauss *)new FootprintGauss(arg1); + { + try { + result = (FootprintGauss *)new FootprintGauss(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FootprintGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29781,7 +31401,17 @@ SWIGINTERN PyObject *_wrap_FootprintGauss_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FootprintGauss_clone" "', argument " "1"" of type '" "FootprintGauss const *""'"); } arg1 = reinterpret_cast< FootprintGauss * >(argp1); - result = (FootprintGauss *)((FootprintGauss const *)arg1)->clone(); + { + try { + result = (FootprintGauss *)((FootprintGauss const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FootprintGauss, 0 | 0 ); return resultobj; fail: @@ -29804,7 +31434,17 @@ SWIGINTERN PyObject *_wrap_FootprintGauss_className(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FootprintGauss_className" "', argument " "1"" of type '" "FootprintGauss const *""'"); } arg1 = reinterpret_cast< FootprintGauss * >(argp1); - result = ((FootprintGauss const *)arg1)->className(); + { + try { + result = ((FootprintGauss const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -29834,7 +31474,17 @@ SWIGINTERN PyObject *_wrap_FootprintGauss_calculate(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FootprintGauss_calculate" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((FootprintGauss const *)arg1)->calculate(arg2); + { + try { + result = (double)((FootprintGauss const *)arg1)->calculate(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -29856,7 +31506,17 @@ SWIGINTERN PyObject *_wrap_delete_FootprintGauss(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FootprintGauss" "', argument " "1"" of type '" "FootprintGauss *""'"); } arg1 = reinterpret_cast< FootprintGauss * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29890,7 +31550,17 @@ SWIGINTERN PyObject *_wrap_new_FootprintSquare__SWIG_0(PyObject *self, Py_ssize_ arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (FootprintSquare *)new FootprintSquare(arg1); + { + try { + result = (FootprintSquare *)new FootprintSquare(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FootprintSquare, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29911,7 +31581,17 @@ SWIGINTERN PyObject *_wrap_new_FootprintSquare__SWIG_1(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FootprintSquare" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (FootprintSquare *)new FootprintSquare(arg1); + { + try { + result = (FootprintSquare *)new FootprintSquare(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FootprintSquare, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29970,7 +31650,17 @@ SWIGINTERN PyObject *_wrap_FootprintSquare_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FootprintSquare_clone" "', argument " "1"" of type '" "FootprintSquare const *""'"); } arg1 = reinterpret_cast< FootprintSquare * >(argp1); - result = (FootprintSquare *)((FootprintSquare const *)arg1)->clone(); + { + try { + result = (FootprintSquare *)((FootprintSquare const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FootprintSquare, 0 | 0 ); return resultobj; fail: @@ -29993,7 +31683,17 @@ SWIGINTERN PyObject *_wrap_FootprintSquare_className(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FootprintSquare_className" "', argument " "1"" of type '" "FootprintSquare const *""'"); } arg1 = reinterpret_cast< FootprintSquare * >(argp1); - result = ((FootprintSquare const *)arg1)->className(); + { + try { + result = ((FootprintSquare const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -30023,7 +31723,17 @@ SWIGINTERN PyObject *_wrap_FootprintSquare_calculate(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FootprintSquare_calculate" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((FootprintSquare const *)arg1)->calculate(arg2); + { + try { + result = (double)((FootprintSquare const *)arg1)->calculate(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -30045,7 +31755,17 @@ SWIGINTERN PyObject *_wrap_delete_FootprintSquare(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FootprintSquare" "', argument " "1"" of type '" "FootprintSquare *""'"); } arg1 = reinterpret_cast< FootprintSquare * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30078,7 +31798,17 @@ SWIGINTERN PyObject *_wrap_delete_IShape2D(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IShape2D" "', argument " "1"" of type '" "IShape2D *""'"); } arg1 = reinterpret_cast< IShape2D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30101,7 +31831,17 @@ SWIGINTERN PyObject *_wrap_IShape2D_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IShape2D_clone" "', argument " "1"" of type '" "IShape2D const *""'"); } arg1 = reinterpret_cast< IShape2D * >(argp1); - result = (IShape2D *)((IShape2D const *)arg1)->clone(); + { + try { + result = (IShape2D *)((IShape2D const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IShape2D, 0 | 0 ); return resultobj; fail: @@ -30138,7 +31878,17 @@ SWIGINTERN PyObject *_wrap_IShape2D_contains__SWIG_0(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IShape2D_contains" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (bool)((IShape2D const *)arg1)->contains(arg2,arg3); + { + try { + result = (bool)((IShape2D const *)arg1)->contains(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30181,7 +31931,17 @@ SWIGINTERN PyObject *_wrap_IShape2D_contains__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IShape2D_contains" "', argument " "3"" of type '" "Bin1D const &""'"); } arg3 = reinterpret_cast< Bin1D * >(argp3); - result = (bool)((IShape2D const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + { + try { + result = (bool)((IShape2D const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30297,7 +32057,17 @@ SWIGINTERN PyObject *_wrap_new_Ellipse__SWIG_0(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Ellipse" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - result = (Ellipse *)new Ellipse(arg1,arg2,arg3,arg4,arg5); + { + try { + result = (Ellipse *)new Ellipse(arg1,arg2,arg3,arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ellipse, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30342,7 +32112,17 @@ SWIGINTERN PyObject *_wrap_new_Ellipse__SWIG_1(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Ellipse" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (Ellipse *)new Ellipse(arg1,arg2,arg3,arg4); + { + try { + result = (Ellipse *)new Ellipse(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ellipse, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30445,7 +32225,17 @@ SWIGINTERN PyObject *_wrap_Ellipse_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ellipse_clone" "', argument " "1"" of type '" "Ellipse const *""'"); } arg1 = reinterpret_cast< Ellipse * >(argp1); - result = (Ellipse *)((Ellipse const *)arg1)->clone(); + { + try { + result = (Ellipse *)((Ellipse const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ellipse, 0 | 0 ); return resultobj; fail: @@ -30482,7 +32272,17 @@ SWIGINTERN PyObject *_wrap_Ellipse_contains__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Ellipse_contains" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (bool)((Ellipse const *)arg1)->contains(arg2,arg3); + { + try { + result = (bool)((Ellipse const *)arg1)->contains(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30525,7 +32325,17 @@ SWIGINTERN PyObject *_wrap_Ellipse_contains__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Ellipse_contains" "', argument " "3"" of type '" "Bin1D const &""'"); } arg3 = reinterpret_cast< Bin1D * >(argp3); - result = (bool)((Ellipse const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + { + try { + result = (bool)((Ellipse const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30604,7 +32414,17 @@ SWIGINTERN PyObject *_wrap_Ellipse_getCenterX(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ellipse_getCenterX" "', argument " "1"" of type '" "Ellipse const *""'"); } arg1 = reinterpret_cast< Ellipse * >(argp1); - result = (double)((Ellipse const *)arg1)->getCenterX(); + { + try { + result = (double)((Ellipse const *)arg1)->getCenterX(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -30627,7 +32447,17 @@ SWIGINTERN PyObject *_wrap_Ellipse_getCenterY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ellipse_getCenterY" "', argument " "1"" of type '" "Ellipse const *""'"); } arg1 = reinterpret_cast< Ellipse * >(argp1); - result = (double)((Ellipse const *)arg1)->getCenterY(); + { + try { + result = (double)((Ellipse const *)arg1)->getCenterY(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -30650,7 +32480,17 @@ SWIGINTERN PyObject *_wrap_Ellipse_radiusX(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ellipse_radiusX" "', argument " "1"" of type '" "Ellipse const *""'"); } arg1 = reinterpret_cast< Ellipse * >(argp1); - result = (double)((Ellipse const *)arg1)->radiusX(); + { + try { + result = (double)((Ellipse const *)arg1)->radiusX(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -30673,7 +32513,17 @@ SWIGINTERN PyObject *_wrap_Ellipse_radiusY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ellipse_radiusY" "', argument " "1"" of type '" "Ellipse const *""'"); } arg1 = reinterpret_cast< Ellipse * >(argp1); - result = (double)((Ellipse const *)arg1)->radiusY(); + { + try { + result = (double)((Ellipse const *)arg1)->radiusY(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -30696,7 +32546,17 @@ SWIGINTERN PyObject *_wrap_Ellipse_getTheta(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ellipse_getTheta" "', argument " "1"" of type '" "Ellipse const *""'"); } arg1 = reinterpret_cast< Ellipse * >(argp1); - result = (double)((Ellipse const *)arg1)->getTheta(); + { + try { + result = (double)((Ellipse const *)arg1)->getTheta(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -30718,7 +32578,17 @@ SWIGINTERN PyObject *_wrap_delete_Ellipse(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Ellipse" "', argument " "1"" of type '" "Ellipse *""'"); } arg1 = reinterpret_cast< Ellipse * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30775,7 +32645,17 @@ SWIGINTERN PyObject *_wrap_new_Line(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Line" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (Line *)new Line(arg1,arg2,arg3,arg4); + { + try { + result = (Line *)new Line(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Line, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30798,7 +32678,17 @@ SWIGINTERN PyObject *_wrap_Line_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Line_clone" "', argument " "1"" of type '" "Line const *""'"); } arg1 = reinterpret_cast< Line * >(argp1); - result = (Line *)((Line const *)arg1)->clone(); + { + try { + result = (Line *)((Line const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Line, 0 | 0 ); return resultobj; fail: @@ -30835,7 +32725,17 @@ SWIGINTERN PyObject *_wrap_Line_contains__SWIG_0(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Line_contains" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (bool)((Line const *)arg1)->contains(arg2,arg3); + { + try { + result = (bool)((Line const *)arg1)->contains(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30878,7 +32778,17 @@ SWIGINTERN PyObject *_wrap_Line_contains__SWIG_1(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Line_contains" "', argument " "3"" of type '" "Bin1D const &""'"); } arg3 = reinterpret_cast< Bin1D * >(argp3); - result = (bool)((Line const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + { + try { + result = (bool)((Line const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30956,7 +32866,17 @@ SWIGINTERN PyObject *_wrap_delete_Line(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Line" "', argument " "1"" of type '" "Line *""'"); } arg1 = reinterpret_cast< Line * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30990,7 +32910,17 @@ SWIGINTERN PyObject *_wrap_new_VerticalLine(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VerticalLine" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (VerticalLine *)new VerticalLine(arg1); + { + try { + result = (VerticalLine *)new VerticalLine(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VerticalLine, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -31013,7 +32943,17 @@ SWIGINTERN PyObject *_wrap_VerticalLine_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VerticalLine_clone" "', argument " "1"" of type '" "VerticalLine const *""'"); } arg1 = reinterpret_cast< VerticalLine * >(argp1); - result = (VerticalLine *)((VerticalLine const *)arg1)->clone(); + { + try { + result = (VerticalLine *)((VerticalLine const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VerticalLine, 0 | 0 ); return resultobj; fail: @@ -31050,7 +32990,17 @@ SWIGINTERN PyObject *_wrap_VerticalLine_contains__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VerticalLine_contains" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (bool)((VerticalLine const *)arg1)->contains(arg2,arg3); + { + try { + result = (bool)((VerticalLine const *)arg1)->contains(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31093,7 +33043,17 @@ SWIGINTERN PyObject *_wrap_VerticalLine_contains__SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VerticalLine_contains" "', argument " "3"" of type '" "Bin1D const &""'"); } arg3 = reinterpret_cast< Bin1D * >(argp3); - result = (bool)((VerticalLine const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + { + try { + result = (bool)((VerticalLine const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31172,7 +33132,17 @@ SWIGINTERN PyObject *_wrap_VerticalLine_getXpos(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VerticalLine_getXpos" "', argument " "1"" of type '" "VerticalLine const *""'"); } arg1 = reinterpret_cast< VerticalLine * >(argp1); - result = (double)((VerticalLine const *)arg1)->getXpos(); + { + try { + result = (double)((VerticalLine const *)arg1)->getXpos(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -31194,7 +33164,17 @@ SWIGINTERN PyObject *_wrap_delete_VerticalLine(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VerticalLine" "', argument " "1"" of type '" "VerticalLine *""'"); } arg1 = reinterpret_cast< VerticalLine * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31228,7 +33208,17 @@ SWIGINTERN PyObject *_wrap_new_HorizontalLine(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HorizontalLine" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (HorizontalLine *)new HorizontalLine(arg1); + { + try { + result = (HorizontalLine *)new HorizontalLine(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HorizontalLine, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -31251,7 +33241,17 @@ SWIGINTERN PyObject *_wrap_HorizontalLine_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalLine_clone" "', argument " "1"" of type '" "HorizontalLine const *""'"); } arg1 = reinterpret_cast< HorizontalLine * >(argp1); - result = (HorizontalLine *)((HorizontalLine const *)arg1)->clone(); + { + try { + result = (HorizontalLine *)((HorizontalLine const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HorizontalLine, 0 | 0 ); return resultobj; fail: @@ -31288,7 +33288,17 @@ SWIGINTERN PyObject *_wrap_HorizontalLine_contains__SWIG_0(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HorizontalLine_contains" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (bool)((HorizontalLine const *)arg1)->contains(arg2,arg3); + { + try { + result = (bool)((HorizontalLine const *)arg1)->contains(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31331,7 +33341,17 @@ SWIGINTERN PyObject *_wrap_HorizontalLine_contains__SWIG_1(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HorizontalLine_contains" "', argument " "3"" of type '" "Bin1D const &""'"); } arg3 = reinterpret_cast< Bin1D * >(argp3); - result = (bool)((HorizontalLine const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + { + try { + result = (bool)((HorizontalLine const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31410,7 +33430,17 @@ SWIGINTERN PyObject *_wrap_HorizontalLine_getYpos(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalLine_getYpos" "', argument " "1"" of type '" "HorizontalLine const *""'"); } arg1 = reinterpret_cast< HorizontalLine * >(argp1); - result = (double)((HorizontalLine const *)arg1)->getYpos(); + { + try { + result = (double)((HorizontalLine const *)arg1)->getYpos(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -31432,7 +33462,17 @@ SWIGINTERN PyObject *_wrap_delete_HorizontalLine(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HorizontalLine" "', argument " "1"" of type '" "HorizontalLine *""'"); } arg1 = reinterpret_cast< HorizontalLine * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31476,7 +33516,17 @@ SWIGINTERN PyObject *_wrap_new_Polygon__SWIG_0(PyObject *self, Py_ssize_t nobjs, arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Polygon *)new Polygon(arg1,arg2); + { + try { + result = (Polygon *)new Polygon(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -31499,7 +33549,17 @@ SWIGINTERN PyObject *_wrap_new_Polygon__SWIG_1(PyObject *self, Py_ssize_t nobjs, arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Polygon *)new Polygon(arg1); + { + try { + result = (Polygon *)new Polygon(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -31520,7 +33580,17 @@ SWIGINTERN PyObject *_wrap_new_Polygon__SWIG_2(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Polygon" "', argument " "1"" of type '" "PolygonPrivate const *""'"); } arg1 = reinterpret_cast< PolygonPrivate * >(argp1); - result = (Polygon *)new Polygon((PolygonPrivate const *)arg1); + { + try { + result = (Polygon *)new Polygon((PolygonPrivate const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -31590,7 +33660,17 @@ SWIGINTERN PyObject *_wrap_delete_Polygon(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Polygon" "', argument " "1"" of type '" "Polygon *""'"); } arg1 = reinterpret_cast< Polygon * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31613,7 +33693,17 @@ SWIGINTERN PyObject *_wrap_Polygon_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygon_clone" "', argument " "1"" of type '" "Polygon const *""'"); } arg1 = reinterpret_cast< Polygon * >(argp1); - result = (Polygon *)((Polygon const *)arg1)->clone(); + { + try { + result = (Polygon *)((Polygon const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon, 0 | 0 ); return resultobj; fail: @@ -31650,7 +33740,17 @@ SWIGINTERN PyObject *_wrap_Polygon_contains__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Polygon_contains" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (bool)((Polygon const *)arg1)->contains(arg2,arg3); + { + try { + result = (bool)((Polygon const *)arg1)->contains(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31693,7 +33793,17 @@ SWIGINTERN PyObject *_wrap_Polygon_contains__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Polygon_contains" "', argument " "3"" of type '" "Bin1D const &""'"); } arg3 = reinterpret_cast< Bin1D * >(argp3); - result = (bool)((Polygon const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + { + try { + result = (bool)((Polygon const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31772,7 +33882,17 @@ SWIGINTERN PyObject *_wrap_Polygon_getArea(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygon_getArea" "', argument " "1"" of type '" "Polygon const *""'"); } arg1 = reinterpret_cast< Polygon * >(argp1); - result = (double)((Polygon const *)arg1)->getArea(); + { + try { + result = (double)((Polygon const *)arg1)->getArea(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -31815,7 +33935,17 @@ SWIGINTERN PyObject *_wrap_Polygon_getPoints(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Polygon_getPoints" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > &""'"); } arg3 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp3); - ((Polygon const *)arg1)->getPoints(*arg2,*arg3); + { + try { + ((Polygon const *)arg1)->getPoints(*arg2,*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31879,7 +34009,17 @@ SWIGINTERN PyObject *_wrap_new_Rectangle__SWIG_0(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Rectangle" "', argument " "5"" of type '" "bool""'"); } arg5 = static_cast< bool >(val5); - result = (Rectangle *)new Rectangle(arg1,arg2,arg3,arg4,arg5); + { + try { + result = (Rectangle *)new Rectangle(arg1,arg2,arg3,arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Rectangle, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -31924,7 +34064,17 @@ SWIGINTERN PyObject *_wrap_new_Rectangle__SWIG_1(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Rectangle" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (Rectangle *)new Rectangle(arg1,arg2,arg3,arg4); + { + try { + result = (Rectangle *)new Rectangle(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Rectangle, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32027,7 +34177,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rectangle_clone" "', argument " "1"" of type '" "Rectangle const *""'"); } arg1 = reinterpret_cast< Rectangle * >(argp1); - result = (Rectangle *)((Rectangle const *)arg1)->clone(); + { + try { + result = (Rectangle *)((Rectangle const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Rectangle, 0 | 0 ); return resultobj; fail: @@ -32055,7 +34215,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_setInverted__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Rectangle_setInverted" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setInverted(arg2); + { + try { + (arg1)->setInverted(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32075,7 +34245,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_setInverted__SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rectangle_setInverted" "', argument " "1"" of type '" "Rectangle *""'"); } arg1 = reinterpret_cast< Rectangle * >(argp1); - (arg1)->setInverted(); + { + try { + (arg1)->setInverted(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32154,7 +34334,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_contains__SWIG_0(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Rectangle_contains" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (bool)((Rectangle const *)arg1)->contains(arg2,arg3); + { + try { + result = (bool)((Rectangle const *)arg1)->contains(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -32197,7 +34387,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_contains__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Rectangle_contains" "', argument " "3"" of type '" "Bin1D const &""'"); } arg3 = reinterpret_cast< Bin1D * >(argp3); - result = (bool)((Rectangle const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + { + try { + result = (bool)((Rectangle const *)arg1)->contains((Bin1D const &)*arg2,(Bin1D const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -32276,7 +34476,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_getArea(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rectangle_getArea" "', argument " "1"" of type '" "Rectangle const *""'"); } arg1 = reinterpret_cast< Rectangle * >(argp1); - result = (double)((Rectangle const *)arg1)->getArea(); + { + try { + result = (double)((Rectangle const *)arg1)->getArea(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32299,7 +34509,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_getXlow(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rectangle_getXlow" "', argument " "1"" of type '" "Rectangle const *""'"); } arg1 = reinterpret_cast< Rectangle * >(argp1); - result = (double)((Rectangle const *)arg1)->getXlow(); + { + try { + result = (double)((Rectangle const *)arg1)->getXlow(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32322,7 +34542,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_getYlow(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rectangle_getYlow" "', argument " "1"" of type '" "Rectangle const *""'"); } arg1 = reinterpret_cast< Rectangle * >(argp1); - result = (double)((Rectangle const *)arg1)->getYlow(); + { + try { + result = (double)((Rectangle const *)arg1)->getYlow(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32345,7 +34575,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_getXup(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rectangle_getXup" "', argument " "1"" of type '" "Rectangle const *""'"); } arg1 = reinterpret_cast< Rectangle * >(argp1); - result = (double)((Rectangle const *)arg1)->getXup(); + { + try { + result = (double)((Rectangle const *)arg1)->getXup(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32368,7 +34608,17 @@ SWIGINTERN PyObject *_wrap_Rectangle_getYup(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rectangle_getYup" "', argument " "1"" of type '" "Rectangle const *""'"); } arg1 = reinterpret_cast< Rectangle * >(argp1); - result = (double)((Rectangle const *)arg1)->getYup(); + { + try { + result = (double)((Rectangle const *)arg1)->getYup(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32390,7 +34640,17 @@ SWIGINTERN PyObject *_wrap_delete_Rectangle(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Rectangle" "', argument " "1"" of type '" "Rectangle *""'"); } arg1 = reinterpret_cast< Rectangle * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32423,7 +34683,17 @@ SWIGINTERN PyObject *_wrap_delete_IDetectorResolution(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDetectorResolution" "', argument " "1"" of type '" "IDetectorResolution *""'"); } arg1 = reinterpret_cast< IDetectorResolution * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32446,7 +34716,17 @@ SWIGINTERN PyObject *_wrap_IDetectorResolution_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetectorResolution_clone" "', argument " "1"" of type '" "IDetectorResolution const *""'"); } arg1 = reinterpret_cast< IDetectorResolution * >(argp1); - result = (IDetectorResolution *)((IDetectorResolution const *)arg1)->clone(); + { + try { + result = (IDetectorResolution *)((IDetectorResolution const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetectorResolution, 0 | 0 ); return resultobj; fail: @@ -32475,7 +34755,17 @@ SWIGINTERN PyObject *_wrap_IDetectorResolution_applyDetectorResolution(PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetectorResolution_applyDetectorResolution" "', argument " "2"" of type '" "Datafield *""'"); } arg2 = reinterpret_cast< Datafield * >(argp2); - ((IDetectorResolution const *)arg1)->applyDetectorResolution(arg2); + { + try { + ((IDetectorResolution const *)arg1)->applyDetectorResolution(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32504,7 +34794,17 @@ SWIGINTERN PyObject *_wrap_delete_IResolutionFunction2D(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IResolutionFunction2D" "', argument " "1"" of type '" "IResolutionFunction2D *""'"); } arg1 = reinterpret_cast< IResolutionFunction2D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32542,7 +34842,17 @@ SWIGINTERN PyObject *_wrap_IResolutionFunction2D_evaluateCDF(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IResolutionFunction2D_evaluateCDF" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((IResolutionFunction2D const *)arg1)->evaluateCDF(arg2,arg3); + { + try { + result = (double)((IResolutionFunction2D const *)arg1)->evaluateCDF(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32565,7 +34875,17 @@ SWIGINTERN PyObject *_wrap_IResolutionFunction2D_clone(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IResolutionFunction2D_clone" "', argument " "1"" of type '" "IResolutionFunction2D const *""'"); } arg1 = reinterpret_cast< IResolutionFunction2D * >(argp1); - result = (IResolutionFunction2D *)((IResolutionFunction2D const *)arg1)->clone(); + { + try { + result = (IResolutionFunction2D *)((IResolutionFunction2D const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IResolutionFunction2D, 0 | 0 ); return resultobj; fail: @@ -32602,7 +34922,17 @@ SWIGINTERN PyObject *_wrap_new_ResolutionFunction2DGaussian(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ResolutionFunction2DGaussian" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (ResolutionFunction2DGaussian *)new ResolutionFunction2DGaussian(arg1,arg2); + { + try { + result = (ResolutionFunction2DGaussian *)new ResolutionFunction2DGaussian(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ResolutionFunction2DGaussian, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32625,7 +34955,17 @@ SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_clone(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_clone" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = (ResolutionFunction2DGaussian *)((ResolutionFunction2DGaussian const *)arg1)->clone(); + { + try { + result = (ResolutionFunction2DGaussian *)((ResolutionFunction2DGaussian const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ResolutionFunction2DGaussian, 0 | 0 ); return resultobj; fail: @@ -32648,7 +34988,17 @@ SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_className(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_className" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = ((ResolutionFunction2DGaussian const *)arg1)->className(); + { + try { + result = ((ResolutionFunction2DGaussian const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -32671,7 +35021,17 @@ SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_parDefs(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_parDefs" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = ((ResolutionFunction2DGaussian const *)arg1)->parDefs(); + { + try { + result = ((ResolutionFunction2DGaussian const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -32709,7 +35069,17 @@ SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_evaluateCDF(PyObject *se SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ResolutionFunction2DGaussian_evaluateCDF" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((ResolutionFunction2DGaussian const *)arg1)->evaluateCDF(arg2,arg3); + { + try { + result = (double)((ResolutionFunction2DGaussian const *)arg1)->evaluateCDF(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32732,7 +35102,17 @@ SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_sigmaX(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_sigmaX" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = (double)((ResolutionFunction2DGaussian const *)arg1)->sigmaX(); + { + try { + result = (double)((ResolutionFunction2DGaussian const *)arg1)->sigmaX(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32755,7 +35135,17 @@ SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_sigmaY(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_sigmaY" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = (double)((ResolutionFunction2DGaussian const *)arg1)->sigmaY(); + { + try { + result = (double)((ResolutionFunction2DGaussian const *)arg1)->sigmaY(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32778,7 +35168,17 @@ SWIGINTERN PyObject *_wrap_ResolutionFunction2DGaussian_validate(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ResolutionFunction2DGaussian_validate" "', argument " "1"" of type '" "ResolutionFunction2DGaussian const *""'"); } arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - result = ((ResolutionFunction2DGaussian const *)arg1)->validate(); + { + try { + result = ((ResolutionFunction2DGaussian const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -32800,7 +35200,17 @@ SWIGINTERN PyObject *_wrap_delete_ResolutionFunction2DGaussian(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ResolutionFunction2DGaussian" "', argument " "1"" of type '" "ResolutionFunction2DGaussian *""'"); } arg1 = reinterpret_cast< ResolutionFunction2DGaussian * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32841,7 +35251,17 @@ SWIGINTERN PyObject *_wrap_new_MaskPattern(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MaskPattern" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - result = (MaskPattern *)new MaskPattern(arg1,arg2); + { + try { + result = (MaskPattern *)new MaskPattern(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaskPattern, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32863,7 +35283,17 @@ SWIGINTERN PyObject *_wrap_delete_MaskPattern(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MaskPattern" "', argument " "1"" of type '" "MaskPattern *""'"); } arg1 = reinterpret_cast< MaskPattern * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32886,7 +35316,17 @@ SWIGINTERN PyObject *_wrap_MaskPattern_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaskPattern_clone" "', argument " "1"" of type '" "MaskPattern const *""'"); } arg1 = reinterpret_cast< MaskPattern * >(argp1); - result = (MaskPattern *)((MaskPattern const *)arg1)->clone(); + { + try { + result = (MaskPattern *)((MaskPattern const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaskPattern, 0 | 0 ); return resultobj; fail: @@ -33036,7 +35476,17 @@ SWIGINTERN PyObject *_wrap_new_DetectorMask__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DetectorMask" "', argument " "2"" of type '" "Scale const &""'"); } arg2 = reinterpret_cast< Scale * >(argp2); - result = (DetectorMask *)new DetectorMask((Scale const &)*arg1,(Scale const &)*arg2); + { + try { + result = (DetectorMask *)new DetectorMask((Scale const &)*arg1,(Scale const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DetectorMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33058,7 +35508,17 @@ SWIGINTERN PyObject *_wrap_delete_DetectorMask(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DetectorMask" "', argument " "1"" of type '" "DetectorMask *""'"); } arg1 = reinterpret_cast< DetectorMask * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33082,7 +35542,17 @@ SWIGINTERN PyObject *_wrap_new_DetectorMask__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DetectorMask" "', argument " "1"" of type '" "DetectorMask const &""'"); } arg1 = reinterpret_cast< DetectorMask * >(argp1); - result = (DetectorMask *)new DetectorMask((DetectorMask const &)*arg1); + { + try { + result = (DetectorMask *)new DetectorMask((DetectorMask const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DetectorMask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33160,7 +35630,17 @@ SWIGINTERN PyObject *_wrap_DetectorMask_addMask(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DetectorMask_addMask" "', argument " "3"" of type '" "bool""'"); } arg3 = static_cast< bool >(val3); - (arg1)->addMask((IShape2D const &)*arg2,arg3); + { + try { + (arg1)->addMask((IShape2D const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33190,7 +35670,17 @@ SWIGINTERN PyObject *_wrap_DetectorMask_isMasked(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DetectorMask_isMasked" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (bool)((DetectorMask const *)arg1)->isMasked(arg2); + { + try { + result = (bool)((DetectorMask const *)arg1)->isMasked(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -33213,7 +35703,17 @@ SWIGINTERN PyObject *_wrap_DetectorMask_hasMasks(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_hasMasks" "', argument " "1"" of type '" "DetectorMask const *""'"); } arg1 = reinterpret_cast< DetectorMask * >(argp1); - result = (bool)((DetectorMask const *)arg1)->hasMasks(); + { + try { + result = (bool)((DetectorMask const *)arg1)->hasMasks(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -33236,7 +35736,17 @@ SWIGINTERN PyObject *_wrap_DetectorMask_numberOfMaskedChannels(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_numberOfMaskedChannels" "', argument " "1"" of type '" "DetectorMask const *""'"); } arg1 = reinterpret_cast< DetectorMask * >(argp1); - result = (int)((DetectorMask const *)arg1)->numberOfMaskedChannels(); + { + try { + result = (int)((DetectorMask const *)arg1)->numberOfMaskedChannels(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -33259,7 +35769,17 @@ SWIGINTERN PyObject *_wrap_DetectorMask_numberOfMasks(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DetectorMask_numberOfMasks" "', argument " "1"" of type '" "DetectorMask const *""'"); } arg1 = reinterpret_cast< DetectorMask * >(argp1); - result = ((DetectorMask const *)arg1)->numberOfMasks(); + { + try { + result = ((DetectorMask const *)arg1)->numberOfMasks(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -33289,7 +35809,17 @@ SWIGINTERN PyObject *_wrap_DetectorMask_patternAt(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DetectorMask_patternAt" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (MaskPattern *)((DetectorMask const *)arg1)->patternAt(arg2); + { + try { + result = (MaskPattern *)((DetectorMask const *)arg1)->patternAt(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaskPattern, 0 | 0 ); return resultobj; fail: @@ -33323,7 +35853,17 @@ SWIGINTERN PyObject *_wrap_IDetector_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_clone" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = (IDetector *)((IDetector const *)arg1)->clone(); + { + try { + result = (IDetector *)((IDetector const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetector, 0 | 0 ); return resultobj; fail: @@ -33345,7 +35885,17 @@ SWIGINTERN PyObject *_wrap_delete_IDetector(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDetector" "', argument " "1"" of type '" "IDetector *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33377,7 +35927,17 @@ SWIGINTERN PyObject *_wrap_IDetector_setDetectorNormal(PyObject *self, PyObject SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_setDetectorNormal" "', argument " "2"" of type '" "R3 const &""'"); } arg2 = reinterpret_cast< R3 * >(argp2); - (arg1)->setDetectorNormal((R3 const &)*arg2); + { + try { + (arg1)->setDetectorNormal((R3 const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33421,7 +35981,17 @@ SWIGINTERN PyObject *_wrap_IDetector_setAnalyzer__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector_setAnalyzer" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->setAnalyzer(arg2,arg3); + { + try { + (arg1)->setAnalyzer(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33457,7 +36027,17 @@ SWIGINTERN PyObject *_wrap_IDetector_setAnalyzer__SWIG_1(PyObject *self, Py_ssiz if (SWIG_IsNewObj(res2)) delete temp; } } - (arg1)->setAnalyzer(arg2); + { + try { + (arg1)->setAnalyzer(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33477,7 +36057,17 @@ SWIGINTERN PyObject *_wrap_IDetector_setAnalyzer__SWIG_2(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_setAnalyzer" "', argument " "1"" of type '" "IDetector *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - (arg1)->setAnalyzer(); + { + try { + (arg1)->setAnalyzer(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33529,7 +36119,17 @@ SWIGINTERN PyObject *_wrap_IDetector_setAnalyzer__SWIG_3(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IDetector_setAnalyzer" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->setAnalyzer(arg2,arg3,arg4); + { + try { + (arg1)->setAnalyzer(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33647,7 +36247,17 @@ SWIGINTERN PyObject *_wrap_IDetector_setDetectorResolution(PyObject *self, PyObj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_setDetectorResolution" "', argument " "2"" of type '" "IDetectorResolution const &""'"); } arg2 = reinterpret_cast< IDetectorResolution * >(argp2); - (arg1)->setDetectorResolution((IDetectorResolution const &)*arg2); + { + try { + (arg1)->setDetectorResolution((IDetectorResolution const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33679,7 +36289,17 @@ SWIGINTERN PyObject *_wrap_IDetector_setResolutionFunction(PyObject *self, PyObj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_setResolutionFunction" "', argument " "2"" of type '" "IResolutionFunction2D const &""'"); } arg2 = reinterpret_cast< IResolutionFunction2D * >(argp2); - (arg1)->setResolutionFunction((IResolutionFunction2D const &)*arg2); + { + try { + (arg1)->setResolutionFunction((IResolutionFunction2D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33702,7 +36322,17 @@ SWIGINTERN PyObject *_wrap_IDetector_nodeChildren(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_nodeChildren" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = ((IDetector const *)arg1)->nodeChildren(); + { + try { + result = ((IDetector const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< INode const *,std::allocator< INode const * > >(result)), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -33739,7 +36369,17 @@ SWIGINTERN PyObject *_wrap_IDetector_iterateOverNonMaskedPoints(PyObject *self, if (SWIG_IsNewObj(res2)) delete temp; } } - ((IDetector const *)arg1)->iterateOverNonMaskedPoints(arg2); + { + try { + ((IDetector const *)arg1)->iterateOverNonMaskedPoints(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33762,7 +36402,17 @@ SWIGINTERN PyObject *_wrap_IDetector_detectorMask(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_detectorMask" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = (DetectorMask *)((IDetector const *)arg1)->detectorMask(); + { + try { + result = (DetectorMask *)((IDetector const *)arg1)->detectorMask(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DetectorMask, 0 | 0 ); return resultobj; fail: @@ -33801,7 +36451,17 @@ SWIGINTERN PyObject *_wrap_IDetector_addMask__SWIG_0(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector_addMask" "', argument " "3"" of type '" "bool""'"); } arg3 = static_cast< bool >(val3); - (arg1)->addMask((IShape2D const &)*arg2,arg3); + { + try { + (arg1)->addMask((IShape2D const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33832,7 +36492,17 @@ SWIGINTERN PyObject *_wrap_IDetector_addMask__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_addMask" "', argument " "2"" of type '" "IShape2D const &""'"); } arg2 = reinterpret_cast< IShape2D * >(argp2); - (arg1)->addMask((IShape2D const &)*arg2); + { + try { + (arg1)->addMask((IShape2D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33904,7 +36574,17 @@ SWIGINTERN PyObject *_wrap_IDetector_maskAll(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_maskAll" "', argument " "1"" of type '" "IDetector *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - (arg1)->maskAll(); + { + try { + (arg1)->maskAll(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33957,7 +36637,17 @@ SWIGINTERN PyObject *_wrap_IDetector_setRegionOfInterest(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IDetector_setRegionOfInterest" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - (arg1)->setRegionOfInterest(arg2,arg3,arg4,arg5); + { + try { + (arg1)->setRegionOfInterest(arg2,arg3,arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33990,7 +36680,17 @@ SWIGINTERN PyObject *_wrap_IDetector_scatteringCoords(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_scatteringCoords" "', argument " "2"" of type '" "Beam const &""'"); } arg2 = reinterpret_cast< Beam * >(argp2); - result = (CoordSystem2D *)((IDetector const *)arg1)->scatteringCoords((Beam const &)*arg2); + { + try { + result = (CoordSystem2D *)((IDetector const *)arg1)->scatteringCoords((Beam const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CoordSystem2D, 0 | 0 ); return resultobj; fail: @@ -34013,7 +36713,17 @@ SWIGINTERN PyObject *_wrap_IDetector_active_indices(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_active_indices" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = ((IDetector const *)arg1)->active_indices(); + { + try { + result = ((IDetector const *)arg1)->active_indices(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< size_t,std::allocator< size_t > >(result)), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -34043,7 +36753,17 @@ SWIGINTERN PyObject *_wrap_IDetector_createPixel(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector_createPixel" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (IPixel *)((IDetector const *)arg1)->createPixel(arg2); + { + try { + result = (IPixel *)((IDetector const *)arg1)->createPixel(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IPixel, 0 | 0 ); return resultobj; fail: @@ -34076,7 +36796,17 @@ SWIGINTERN PyObject *_wrap_IDetector_indexOfSpecular(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_indexOfSpecular" "', argument " "2"" of type '" "Beam const &""'"); } arg2 = reinterpret_cast< Beam * >(argp2); - result = ((IDetector const *)arg1)->indexOfSpecular((Beam const &)*arg2); + { + try { + result = ((IDetector const *)arg1)->indexOfSpecular((Beam const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -34106,7 +36836,17 @@ SWIGINTERN PyObject *_wrap_IDetector_axis(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector_axis" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (Scale *) &((IDetector const *)arg1)->axis(arg2); + { + try { + result = (Scale *) &((IDetector const *)arg1)->axis(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, 0 | 0 ); return resultobj; fail: @@ -34144,7 +36884,17 @@ SWIGINTERN PyObject *_wrap_IDetector_axisBinIndex(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector_axisBinIndex" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = ((IDetector const *)arg1)->axisBinIndex(arg2,arg3); + { + try { + result = ((IDetector const *)arg1)->axisBinIndex(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -34167,7 +36917,17 @@ SWIGINTERN PyObject *_wrap_IDetector_totalSize(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_totalSize" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = ((IDetector const *)arg1)->totalSize(); + { + try { + result = ((IDetector const *)arg1)->totalSize(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -34190,7 +36950,17 @@ SWIGINTERN PyObject *_wrap_IDetector_sizeOfRegionOfInterest(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_sizeOfRegionOfInterest" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = ((IDetector const *)arg1)->sizeOfRegionOfInterest(); + { + try { + result = ((IDetector const *)arg1)->sizeOfRegionOfInterest(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -34213,7 +36983,17 @@ SWIGINTERN PyObject *_wrap_IDetector_hasExplicitRegionOfInterest(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_hasExplicitRegionOfInterest" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = (bool)((IDetector const *)arg1)->hasExplicitRegionOfInterest(); + { + try { + result = (bool)((IDetector const *)arg1)->hasExplicitRegionOfInterest(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -34236,7 +37016,17 @@ SWIGINTERN PyObject *_wrap_IDetector_axesClippedToRegionOfInterest(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_axesClippedToRegionOfInterest" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = ((IDetector const *)arg1)->axesClippedToRegionOfInterest(); + { + try { + result = ((IDetector const *)arg1)->axesClippedToRegionOfInterest(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< Scale const *,std::allocator< Scale const * > >(result)), SWIGTYPE_p_std__vectorT_Scale_const_p_std__allocatorT_Scale_const_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -34266,7 +37056,17 @@ SWIGINTERN PyObject *_wrap_IDetector_regionOfInterestIndexToDetectorIndex(PyObje SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector_regionOfInterestIndexToDetectorIndex" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((IDetector const *)arg1)->regionOfInterestIndexToDetectorIndex(arg2); + { + try { + result = ((IDetector const *)arg1)->regionOfInterestIndexToDetectorIndex(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -34295,7 +37095,17 @@ SWIGINTERN PyObject *_wrap_IDetector_applyDetectorResolution(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_applyDetectorResolution" "', argument " "2"" of type '" "Datafield *""'"); } arg2 = reinterpret_cast< Datafield * >(argp2); - ((IDetector const *)arg1)->applyDetectorResolution(arg2); + { + try { + ((IDetector const *)arg1)->applyDetectorResolution(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34318,7 +37128,17 @@ SWIGINTERN PyObject *_wrap_IDetector_detectorResolution(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_detectorResolution" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = (IDetectorResolution *)((IDetector const *)arg1)->detectorResolution(); + { + try { + result = (IDetectorResolution *)((IDetector const *)arg1)->detectorResolution(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetectorResolution, 0 | 0 ); return resultobj; fail: @@ -34341,7 +37161,17 @@ SWIGINTERN PyObject *_wrap_IDetector_defaultCoords(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_defaultCoords" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); - result = (Coords)((IDetector const *)arg1)->defaultCoords(); + { + try { + result = (Coords)((IDetector const *)arg1)->defaultCoords(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -34371,7 +37201,17 @@ SWIGINTERN PyObject *_wrap_IDetector_regionOfInterestBounds(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDetector_regionOfInterestBounds" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((IDetector const *)arg1)->regionOfInterestBounds(arg2); + { + try { + result = ((IDetector const *)arg1)->regionOfInterestBounds(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::pair< double,double > >(result)); return resultobj; fail: @@ -34407,7 +37247,17 @@ SWIGINTERN PyObject *_wrap_new_RectangularDetector__SWIG_0(PyObject *self, Py_ss if (SWIG_IsNewObj(res1)) delete temp; } } - result = (RectangularDetector *)new RectangularDetector(arg1); + { + try { + result = (RectangularDetector *)new RectangularDetector(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RectangularDetector, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34452,7 +37302,17 @@ SWIGINTERN PyObject *_wrap_new_RectangularDetector__SWIG_1(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_RectangularDetector" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (RectangularDetector *)new RectangularDetector(arg1,arg2,arg3,arg4); + { + try { + result = (RectangularDetector *)new RectangularDetector(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RectangularDetector, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34476,7 +37336,17 @@ SWIGINTERN PyObject *_wrap_new_RectangularDetector__SWIG_2(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RectangularDetector" "', argument " "1"" of type '" "RectangularDetector const &""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (RectangularDetector *)new RectangularDetector((RectangularDetector const &)*arg1); + { + try { + result = (RectangularDetector *)new RectangularDetector((RectangularDetector const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RectangularDetector, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34561,7 +37431,17 @@ SWIGINTERN PyObject *_wrap_delete_RectangularDetector(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RectangularDetector" "', argument " "1"" of type '" "RectangularDetector *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34584,7 +37464,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_clone" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (RectangularDetector *)((RectangularDetector const *)arg1)->clone(); + { + try { + result = (RectangularDetector *)((RectangularDetector const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RectangularDetector, 0 | 0 ); return resultobj; fail: @@ -34607,7 +37497,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_className(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_className" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = ((RectangularDetector const *)arg1)->className(); + { + try { + result = ((RectangularDetector const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34639,7 +37539,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setDetectorNormal(PyObject *self, SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RectangularDetector_setDetectorNormal" "', argument " "2"" of type '" "R3 const &""'"); } arg2 = reinterpret_cast< R3 * >(argp2); - (arg1)->setDetectorNormal((R3 const &)*arg2); + { + try { + (arg1)->setDetectorNormal((R3 const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34707,7 +37617,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setDetectorPosition__SWIG_0(PyObj if (SWIG_IsNewObj(res5)) delete temp; } } - (arg1)->setDetectorPosition(arg2,arg3,arg4,arg5); + { + try { + (arg1)->setDetectorPosition(arg2,arg3,arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34759,7 +37679,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setDetectorPosition__SWIG_1(PyObj SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RectangularDetector_setDetectorPosition" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->setDetectorPosition(arg2,arg3,arg4); + { + try { + (arg1)->setDetectorPosition(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34876,7 +37806,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setPerpendicularToSampleX(PyObjec SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RectangularDetector_setPerpendicularToSampleX" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->setPerpendicularToSampleX(arg2,arg3,arg4); + { + try { + (arg1)->setPerpendicularToSampleX(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34921,7 +37861,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setPerpendicularToDirectBeam(PyOb SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RectangularDetector_setPerpendicularToDirectBeam" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->setPerpendicularToDirectBeam(arg2,arg3,arg4); + { + try { + (arg1)->setPerpendicularToDirectBeam(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34965,7 +37915,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setPerpendicularToReflectedBeam__ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RectangularDetector_setPerpendicularToReflectedBeam" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->setPerpendicularToReflectedBeam(arg2,arg3,arg4); + { + try { + (arg1)->setPerpendicularToReflectedBeam(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35001,7 +37961,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setPerpendicularToReflectedBeam__ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RectangularDetector_setPerpendicularToReflectedBeam" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->setPerpendicularToReflectedBeam(arg2,arg3); + { + try { + (arg1)->setPerpendicularToReflectedBeam(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35029,7 +37999,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setPerpendicularToReflectedBeam__ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RectangularDetector_setPerpendicularToReflectedBeam" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setPerpendicularToReflectedBeam(arg2); + { + try { + (arg1)->setPerpendicularToReflectedBeam(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35134,7 +38114,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_width(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_width" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (double)((RectangularDetector const *)arg1)->width(); + { + try { + result = (double)((RectangularDetector const *)arg1)->width(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35157,7 +38147,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_height(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_height" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (double)((RectangularDetector const *)arg1)->height(); + { + try { + result = (double)((RectangularDetector const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35180,7 +38180,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_xSize(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_xSize" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = ((RectangularDetector const *)arg1)->xSize(); + { + try { + result = ((RectangularDetector const *)arg1)->xSize(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -35203,7 +38213,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_ySize(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_ySize" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = ((RectangularDetector const *)arg1)->ySize(); + { + try { + result = ((RectangularDetector const *)arg1)->ySize(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -35226,7 +38246,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_getNormalVector(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_getNormalVector" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = ((RectangularDetector const *)arg1)->getNormalVector(); + { + try { + result = ((RectangularDetector const *)arg1)->getNormalVector(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -35249,7 +38279,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_getU0(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_getU0" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (double)((RectangularDetector const *)arg1)->getU0(); + { + try { + result = (double)((RectangularDetector const *)arg1)->getU0(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35272,7 +38312,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_getV0(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_getV0" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (double)((RectangularDetector const *)arg1)->getV0(); + { + try { + result = (double)((RectangularDetector const *)arg1)->getV0(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35295,7 +38345,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_getDirectionVector(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_getDirectionVector" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = ((RectangularDetector const *)arg1)->getDirectionVector(); + { + try { + result = ((RectangularDetector const *)arg1)->getDirectionVector(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -35318,7 +38378,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_getDistance(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_getDistance" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (double)((RectangularDetector const *)arg1)->getDistance(); + { + try { + result = (double)((RectangularDetector const *)arg1)->getDistance(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35341,7 +38411,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_getDirectBeamU0(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_getDirectBeamU0" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (double)((RectangularDetector const *)arg1)->getDirectBeamU0(); + { + try { + result = (double)((RectangularDetector const *)arg1)->getDirectBeamU0(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35364,7 +38444,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_getDirectBeamV0(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_getDirectBeamV0" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (double)((RectangularDetector const *)arg1)->getDirectBeamV0(); + { + try { + result = (double)((RectangularDetector const *)arg1)->getDirectBeamV0(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35387,7 +38477,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_getDetectorArrangment(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_getDetectorArrangment" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (RectangularDetector::EDetectorArrangement)((RectangularDetector const *)arg1)->getDetectorArrangment(); + { + try { + result = (RectangularDetector::EDetectorArrangement)((RectangularDetector const *)arg1)->getDetectorArrangment(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -35410,7 +38510,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_defaultCoords(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_defaultCoords" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (Coords)((RectangularDetector const *)arg1)->defaultCoords(); + { + try { + result = (Coords)((RectangularDetector const *)arg1)->defaultCoords(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -35433,7 +38543,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_regionOfInterestPixel(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RectangularDetector_regionOfInterestPixel" "', argument " "1"" of type '" "RectangularDetector const *""'"); } arg1 = reinterpret_cast< RectangularDetector * >(argp1); - result = (RectangularPixel *)((RectangularDetector const *)arg1)->regionOfInterestPixel(); + { + try { + result = (RectangularPixel *)((RectangularDetector const *)arg1)->regionOfInterestPixel(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RectangularPixel, 0 | 0 ); return resultobj; fail: @@ -35466,7 +38586,17 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_scatteringCoords(PyObject *self, SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RectangularDetector_scatteringCoords" "', argument " "2"" of type '" "Beam const &""'"); } arg2 = reinterpret_cast< Beam * >(argp2); - result = (CoordSystem2D *)((RectangularDetector const *)arg1)->scatteringCoords((Beam const &)*arg2); + { + try { + result = (CoordSystem2D *)((RectangularDetector const *)arg1)->scatteringCoords((Beam const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CoordSystem2D, 0 | 0 ); return resultobj; fail: @@ -35538,7 +38668,17 @@ SWIGINTERN PyObject *_wrap_new_OffspecDetector__SWIG_0(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_OffspecDetector" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); - result = (OffspecDetector *)new OffspecDetector(arg1,arg2,arg3,arg4,arg5,arg6); + { + try { + result = (OffspecDetector *)new OffspecDetector(arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OffspecDetector, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35562,7 +38702,17 @@ SWIGINTERN PyObject *_wrap_new_OffspecDetector__SWIG_1(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OffspecDetector" "', argument " "1"" of type '" "OffspecDetector const &""'"); } arg1 = reinterpret_cast< OffspecDetector * >(argp1); - result = (OffspecDetector *)new OffspecDetector((OffspecDetector const &)*arg1); + { + try { + result = (OffspecDetector *)new OffspecDetector((OffspecDetector const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OffspecDetector, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35650,7 +38800,17 @@ SWIGINTERN PyObject *_wrap_delete_OffspecDetector(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OffspecDetector" "', argument " "1"" of type '" "OffspecDetector *""'"); } arg1 = reinterpret_cast< OffspecDetector * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35673,7 +38833,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OffspecDetector_clone" "', argument " "1"" of type '" "OffspecDetector const *""'"); } arg1 = reinterpret_cast< OffspecDetector * >(argp1); - result = (OffspecDetector *)((OffspecDetector const *)arg1)->clone(); + { + try { + result = (OffspecDetector *)((OffspecDetector const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OffspecDetector, 0 | 0 ); return resultobj; fail: @@ -35696,7 +38866,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_className(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OffspecDetector_className" "', argument " "1"" of type '" "OffspecDetector const *""'"); } arg1 = reinterpret_cast< OffspecDetector * >(argp1); - result = ((OffspecDetector const *)arg1)->className(); + { + try { + result = ((OffspecDetector const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -35740,7 +38920,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_setAnalyzer__SWIG_0(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OffspecDetector_setAnalyzer" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->setAnalyzer(arg2,arg3); + { + try { + (arg1)->setAnalyzer(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35776,7 +38966,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_setAnalyzer__SWIG_1(PyObject *self, P if (SWIG_IsNewObj(res2)) delete temp; } } - (arg1)->setAnalyzer(arg2); + { + try { + (arg1)->setAnalyzer(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35796,7 +38996,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_setAnalyzer__SWIG_2(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OffspecDetector_setAnalyzer" "', argument " "1"" of type '" "OffspecDetector *""'"); } arg1 = reinterpret_cast< OffspecDetector * >(argp1); - (arg1)->setAnalyzer(); + { + try { + (arg1)->setAnalyzer(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35848,7 +39058,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_setAnalyzer__SWIG_3(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OffspecDetector_setAnalyzer" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->setAnalyzer(arg2,arg3,arg4); + { + try { + (arg1)->setAnalyzer(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35964,7 +39184,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_axis(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OffspecDetector_axis" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (Scale *) &((OffspecDetector const *)arg1)->axis(arg2); + { + try { + result = (Scale *) &((OffspecDetector const *)arg1)->axis(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, 0 | 0 ); return resultobj; fail: @@ -36002,7 +39232,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_axisBinIndex(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OffspecDetector_axisBinIndex" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = ((OffspecDetector const *)arg1)->axisBinIndex(arg2,arg3); + { + try { + result = ((OffspecDetector const *)arg1)->axisBinIndex(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -36025,7 +39265,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_totalSize(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OffspecDetector_totalSize" "', argument " "1"" of type '" "OffspecDetector const *""'"); } arg1 = reinterpret_cast< OffspecDetector * >(argp1); - result = ((OffspecDetector const *)arg1)->totalSize(); + { + try { + result = ((OffspecDetector const *)arg1)->totalSize(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -36048,7 +39298,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_defaultCoords(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OffspecDetector_defaultCoords" "', argument " "1"" of type '" "OffspecDetector const *""'"); } arg1 = reinterpret_cast< OffspecDetector * >(argp1); - result = (Coords)((OffspecDetector const *)arg1)->defaultCoords(); + { + try { + result = (Coords)((OffspecDetector const *)arg1)->defaultCoords(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -36078,7 +39338,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_createPixel(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OffspecDetector_createPixel" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (IPixel *)((OffspecDetector const *)arg1)->createPixel(arg2); + { + try { + result = (IPixel *)((OffspecDetector const *)arg1)->createPixel(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IPixel, 0 | 0 ); return resultobj; fail: @@ -36116,7 +39386,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_indexOfSpecular(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OffspecDetector_indexOfSpecular" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = ((OffspecDetector const *)arg1)->indexOfSpecular(arg2,arg3); + { + try { + result = ((OffspecDetector const *)arg1)->indexOfSpecular(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -36139,7 +39419,17 @@ SWIGINTERN PyObject *_wrap_OffspecDetector_analyzer(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OffspecDetector_analyzer" "', argument " "1"" of type '" "OffspecDetector const *""'"); } arg1 = reinterpret_cast< OffspecDetector * >(argp1); - result = (PolFilter *) &((OffspecDetector const *)arg1)->analyzer(); + { + try { + result = (PolFilter *) &((OffspecDetector const *)arg1)->analyzer(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PolFilter, 0 | 0 ); return resultobj; fail: @@ -36179,7 +39469,17 @@ SWIGINTERN PyObject *_wrap_new_SphericalDetector__SWIG_0(PyObject *self, Py_ssiz if (SWIG_IsNewObj(res1)) delete temp; } } - result = (SphericalDetector *)new SphericalDetector(arg1); + { + try { + result = (SphericalDetector *)new SphericalDetector(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SphericalDetector, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36240,7 +39540,17 @@ SWIGINTERN PyObject *_wrap_new_SphericalDetector__SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SphericalDetector" "', argument " "6"" of type '" "double""'"); } arg6 = static_cast< double >(val6); - result = (SphericalDetector *)new SphericalDetector(arg1,arg2,arg3,arg4,arg5,arg6); + { + try { + result = (SphericalDetector *)new SphericalDetector(arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SphericalDetector, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36285,7 +39595,17 @@ SWIGINTERN PyObject *_wrap_new_SphericalDetector__SWIG_2(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SphericalDetector" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (SphericalDetector *)new SphericalDetector(arg1,arg2,arg3,arg4); + { + try { + result = (SphericalDetector *)new SphericalDetector(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SphericalDetector, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36309,7 +39629,17 @@ SWIGINTERN PyObject *_wrap_new_SphericalDetector__SWIG_3(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SphericalDetector" "', argument " "1"" of type '" "SphericalDetector const &""'"); } arg1 = reinterpret_cast< SphericalDetector * >(argp1); - result = (SphericalDetector *)new SphericalDetector((SphericalDetector const &)*arg1); + { + try { + result = (SphericalDetector *)new SphericalDetector((SphericalDetector const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SphericalDetector, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36435,7 +39765,17 @@ SWIGINTERN PyObject *_wrap_delete_SphericalDetector(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SphericalDetector" "', argument " "1"" of type '" "SphericalDetector *""'"); } arg1 = reinterpret_cast< SphericalDetector * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -36458,7 +39798,17 @@ SWIGINTERN PyObject *_wrap_SphericalDetector_clone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SphericalDetector_clone" "', argument " "1"" of type '" "SphericalDetector const *""'"); } arg1 = reinterpret_cast< SphericalDetector * >(argp1); - result = (SphericalDetector *)((SphericalDetector const *)arg1)->clone(); + { + try { + result = (SphericalDetector *)((SphericalDetector const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SphericalDetector, 0 | 0 ); return resultobj; fail: @@ -36481,7 +39831,17 @@ SWIGINTERN PyObject *_wrap_SphericalDetector_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SphericalDetector_className" "', argument " "1"" of type '" "SphericalDetector const *""'"); } arg1 = reinterpret_cast< SphericalDetector * >(argp1); - result = ((SphericalDetector const *)arg1)->className(); + { + try { + result = ((SphericalDetector const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -36504,7 +39864,17 @@ SWIGINTERN PyObject *_wrap_SphericalDetector_defaultCoords(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SphericalDetector_defaultCoords" "', argument " "1"" of type '" "SphericalDetector const *""'"); } arg1 = reinterpret_cast< SphericalDetector * >(argp1); - result = (Coords)((SphericalDetector const *)arg1)->defaultCoords(); + { + try { + result = (Coords)((SphericalDetector const *)arg1)->defaultCoords(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -36537,7 +39907,17 @@ SWIGINTERN PyObject *_wrap_SphericalDetector_scatteringCoords(PyObject *self, Py SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SphericalDetector_scatteringCoords" "', argument " "2"" of type '" "Beam const &""'"); } arg2 = reinterpret_cast< Beam * >(argp2); - result = (CoordSystem2D *)((SphericalDetector const *)arg1)->scatteringCoords((Beam const &)*arg2); + { + try { + result = (CoordSystem2D *)((SphericalDetector const *)arg1)->scatteringCoords((Beam const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CoordSystem2D, 0 | 0 ); return resultobj; fail: @@ -36567,7 +39947,17 @@ SWIGINTERN PyObject *_wrap_SphericalDetector_createPixel(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SphericalDetector_createPixel" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (IPixel *)((SphericalDetector const *)arg1)->createPixel(arg2); + { + try { + result = (IPixel *)((SphericalDetector const *)arg1)->createPixel(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IPixel, 0 | 0 ); return resultobj; fail: @@ -36600,7 +39990,17 @@ SWIGINTERN PyObject *_wrap_SphericalDetector_indexOfSpecular(PyObject *self, PyO SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SphericalDetector_indexOfSpecular" "', argument " "2"" of type '" "Beam const &""'"); } arg2 = reinterpret_cast< Beam * >(argp2); - result = ((SphericalDetector const *)arg1)->indexOfSpecular((Beam const &)*arg2); + { + try { + result = ((SphericalDetector const *)arg1)->indexOfSpecular((Beam const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -36653,7 +40053,17 @@ SWIGINTERN PyObject *_wrap_readData1D__SWIG_0(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "readData1D" "', argument " "3"" of type '" "ImportSettings1D const *""'"); } arg3 = reinterpret_cast< ImportSettings1D * >(argp3); - result = (Datafield *)IO::readData1D((std::string const &)*arg1,arg2,(ImportSettings1D const *)arg3); + { + try { + result = (Datafield *)IO::readData1D((std::string const &)*arg1,arg2,(ImportSettings1D const *)arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -36689,7 +40099,17 @@ SWIGINTERN PyObject *_wrap_readData1D__SWIG_1(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "readData1D" "', argument " "2"" of type '" "IO::Filetype1D""'"); } arg2 = static_cast< IO::Filetype1D >(val2); - result = (Datafield *)IO::readData1D((std::string const &)*arg1,arg2); + { + try { + result = (Datafield *)IO::readData1D((std::string const &)*arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -36717,7 +40137,17 @@ SWIGINTERN PyObject *_wrap_readData1D__SWIG_2(PyObject *self, Py_ssize_t nobjs, } arg1 = ptr; } - result = (Datafield *)IO::readData1D((std::string const &)*arg1); + { + try { + result = (Datafield *)IO::readData1D((std::string const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -36813,7 +40243,17 @@ SWIGINTERN PyObject *_wrap_readData2D__SWIG_0(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "readData2D" "', argument " "2"" of type '" "IO::Filetype2D""'"); } arg2 = static_cast< IO::Filetype2D >(val2); - result = (Datafield *)IO::readData2D((std::string const &)*arg1,arg2); + { + try { + result = (Datafield *)IO::readData2D((std::string const &)*arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -36841,7 +40281,17 @@ SWIGINTERN PyObject *_wrap_readData2D__SWIG_1(PyObject *self, Py_ssize_t nobjs, } arg1 = ptr; } - result = (Datafield *)IO::readData2D((std::string const &)*arg1); + { + try { + result = (Datafield *)IO::readData2D((std::string const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Datafield, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -36920,7 +40370,17 @@ SWIGINTERN PyObject *_wrap_writeDatafield(PyObject *self, PyObject *args) { } arg2 = ptr; } - IO::writeDatafield((Datafield const &)*arg1,(std::string const &)*arg2); + { + try { + IO::writeDatafield((Datafield const &)*arg1,(std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -36968,7 +40428,17 @@ SWIGINTERN PyObject *_wrap_dataMatchesFile(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dataMatchesFile" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (bool)Util::RW::dataMatchesFile((Datafield const &)*arg1,(std::string const &)*arg2,arg3); + { + try { + result = (bool)Util::RW::dataMatchesFile((Datafield const &)*arg1,(std::string const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -36983,7 +40453,17 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_0(PyObject *self, Py_ssize SimulationResult *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (SimulationResult *)new SimulationResult(); + { + try { + result = (SimulationResult *)new SimulationResult(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37015,7 +40495,17 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_1(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimulationResult" "', argument " "2"" of type '" "ICoordSystem const *""'"); } arg2 = reinterpret_cast< ICoordSystem * >(argp2); - result = (SimulationResult *)new SimulationResult((Datafield const &)*arg1,(ICoordSystem const *)arg2); + { + try { + result = (SimulationResult *)new SimulationResult((Datafield const &)*arg1,(ICoordSystem const *)arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37039,7 +40529,17 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_2(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulationResult" "', argument " "1"" of type '" "SimulationResult const &""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - result = (SimulationResult *)new SimulationResult((SimulationResult const &)*arg1); + { + try { + result = (SimulationResult *)new SimulationResult((SimulationResult const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37069,7 +40569,17 @@ SWIGINTERN PyObject *_wrap_new_SimulationResult__SWIG_3(PyObject *self, Py_ssize } arg1 = reinterpret_cast< SimulationResult * >(argp1); rvrdeleter1.reset(arg1); - result = (SimulationResult *)new SimulationResult((SimulationResult &&)*arg1); + { + try { + result = (SimulationResult *)new SimulationResult((SimulationResult &&)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationResult, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37144,7 +40654,17 @@ SWIGINTERN PyObject *_wrap_delete_SimulationResult(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimulationResult" "', argument " "1"" of type '" "SimulationResult *""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -37167,7 +40687,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_extracted_field(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_extracted_field" "', argument " "1"" of type '" "SimulationResult const *""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - result = ((SimulationResult const *)arg1)->extracted_field(); + { + try { + result = ((SimulationResult const *)arg1)->extracted_field(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Datafield(result)), SWIGTYPE_p_Datafield, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -37204,7 +40734,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axisMinMax__SWIG_0(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimulationResult_axisMinMax" "', argument " "3"" of type '" "Coords""'"); } arg3 = static_cast< Coords >(val3); - result = ((SimulationResult const *)arg1)->axisMinMax(arg2,arg3); + { + try { + result = ((SimulationResult const *)arg1)->axisMinMax(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::pair< double,double > >(result)); return resultobj; fail: @@ -37233,7 +40773,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_axisMinMax__SWIG_1(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_axisMinMax" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((SimulationResult const *)arg1)->axisMinMax(arg2); + { + try { + result = ((SimulationResult const *)arg1)->axisMinMax(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::pair< double,double > >(result)); return resultobj; fail: @@ -37324,7 +40874,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_name_of_axis__SWIG_0(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimulationResult_name_of_axis" "', argument " "3"" of type '" "Coords""'"); } arg3 = static_cast< Coords >(val3); - result = ((SimulationResult const *)arg1)->name_of_axis(arg2,arg3); + { + try { + result = ((SimulationResult const *)arg1)->name_of_axis(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -37353,7 +40913,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_name_of_axis__SWIG_1(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_name_of_axis" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((SimulationResult const *)arg1)->name_of_axis(arg2); + { + try { + result = ((SimulationResult const *)arg1)->name_of_axis(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -37436,7 +41006,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_array__SWIG_0(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_array" "', argument " "2"" of type '" "Coords""'"); } arg2 = static_cast< Coords >(val2); - result = (PyObject *)((SimulationResult const *)arg1)->array(arg2); + { + try { + result = (PyObject *)((SimulationResult const *)arg1)->array(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = result; return resultobj; fail: @@ -37457,7 +41037,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_array__SWIG_1(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_array" "', argument " "1"" of type '" "SimulationResult const *""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - result = (PyObject *)((SimulationResult const *)arg1)->array(); + { + try { + result = (PyObject *)((SimulationResult const *)arg1)->array(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = result; return resultobj; fail: @@ -37528,7 +41118,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_convertedBinCenters__SWIG_0(PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_convertedBinCenters" "', argument " "2"" of type '" "Coords""'"); } arg2 = static_cast< Coords >(val2); - result = ((SimulationResult const *)arg1)->convertedBinCenters(arg2); + { + try { + result = ((SimulationResult const *)arg1)->convertedBinCenters(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -37549,7 +41149,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_convertedBinCenters__SWIG_1(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_convertedBinCenters" "', argument " "1"" of type '" "SimulationResult const *""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - result = ((SimulationResult const *)arg1)->convertedBinCenters(); + { + try { + result = ((SimulationResult const *)arg1)->convertedBinCenters(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -37586,7 +41196,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_convertedBinCenters__SWIG_2(PyObject SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimulationResult_convertedBinCenters" "', argument " "3"" of type '" "Coords""'"); } arg3 = static_cast< Coords >(val3); - result = ((SimulationResult const *)arg1)->convertedBinCenters(arg2,arg3); + { + try { + result = ((SimulationResult const *)arg1)->convertedBinCenters(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -37615,7 +41235,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_convertedBinCenters__SWIG_3(PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_convertedBinCenters" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((SimulationResult const *)arg1)->convertedBinCenters(arg2); + { + try { + result = ((SimulationResult const *)arg1)->convertedBinCenters(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -37729,7 +41359,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_setTitle(PyObject *self, PyObject *a } arg2 = ptr; } - (arg1)->setTitle((std::string const &)*arg2); + { + try { + (arg1)->setTitle((std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -37754,7 +41394,17 @@ SWIGINTERN PyObject *_wrap_SimulationResult_title(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_title" "', argument " "1"" of type '" "SimulationResult *""'"); } arg1 = reinterpret_cast< SimulationResult * >(argp1); - result = (arg1)->title(); + { + try { + result = (arg1)->title(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: diff --git a/auto/Wrap/libBornAgainFit.py b/auto/Wrap/libBornAgainFit.py index 3da65c51ee228929a7848d0a9270aca349b0fbe2..0a6d5ebba1744e60873ca4e2a07f7d784e63e509 100644 --- a/auto/Wrap/libBornAgainFit.py +++ b/auto/Wrap/libBornAgainFit.py @@ -195,21 +195,21 @@ class vdouble1d_t(object): def __delitem__(self, *args): r""" __delitem__(vdouble1d_t self, std::vector< double >::difference_type i) - __delitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vdouble1d_t self, PySliceObject * slice) """ return _libBornAgainFit.vdouble1d_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble1d_t + __getitem__(vdouble1d_t self, PySliceObject * slice) -> vdouble1d_t __getitem__(vdouble1d_t self, std::vector< double >::difference_type i) -> std::vector< double >::value_type const & """ return _libBornAgainFit.vdouble1d_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice, vdouble1d_t v) - __setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vdouble1d_t self, PySliceObject * slice, vdouble1d_t v) + __setitem__(vdouble1d_t self, PySliceObject * slice) __setitem__(vdouble1d_t self, std::vector< double >::difference_type i, std::vector< double >::value_type const & x) """ return _libBornAgainFit.vdouble1d_t___setitem__(self, *args) @@ -361,21 +361,21 @@ class vdouble2d_t(object): def __delitem__(self, *args): r""" __delitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i) - __delitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vdouble2d_t self, PySliceObject * slice) """ return _libBornAgainFit.vdouble2d_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble2d_t + __getitem__(vdouble2d_t self, PySliceObject * slice) -> vdouble2d_t __getitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i) -> vdouble1d_t """ return _libBornAgainFit.vdouble2d_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice, vdouble2d_t v) - __setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vdouble2d_t self, PySliceObject * slice, vdouble2d_t v) + __setitem__(vdouble2d_t self, PySliceObject * slice) __setitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i, vdouble1d_t x) """ return _libBornAgainFit.vdouble2d_t___setitem__(self, *args) @@ -527,21 +527,21 @@ class vector_integer_t(object): def __delitem__(self, *args): r""" __delitem__(vector_integer_t self, std::vector< int >::difference_type i) - __delitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_integer_t self, PySliceObject * slice) """ return _libBornAgainFit.vector_integer_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) -> vector_integer_t + __getitem__(vector_integer_t self, PySliceObject * slice) -> vector_integer_t __getitem__(vector_integer_t self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const & """ return _libBornAgainFit.vector_integer_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice, vector_integer_t v) - __setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_integer_t self, PySliceObject * slice, vector_integer_t v) + __setitem__(vector_integer_t self, PySliceObject * slice) __setitem__(vector_integer_t self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x) """ return _libBornAgainFit.vector_integer_t___setitem__(self, *args) @@ -693,21 +693,21 @@ class vinteger2d_t(object): def __delitem__(self, *args): r""" __delitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i) - __delitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vinteger2d_t self, PySliceObject * slice) """ return _libBornAgainFit.vinteger2d_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) -> vinteger2d_t + __getitem__(vinteger2d_t self, PySliceObject * slice) -> vinteger2d_t __getitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i) -> vector_integer_t """ return _libBornAgainFit.vinteger2d_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice, vinteger2d_t v) - __setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vinteger2d_t self, PySliceObject * slice, vinteger2d_t v) + __setitem__(vinteger2d_t self, PySliceObject * slice) __setitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i, vector_integer_t x) """ return _libBornAgainFit.vinteger2d_t___setitem__(self, *args) @@ -859,21 +859,21 @@ class vector_longinteger_t(object): def __delitem__(self, *args): r""" __delitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i) - __delitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_longinteger_t self, PySliceObject * slice) """ return _libBornAgainFit.vector_longinteger_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) -> vector_longinteger_t + __getitem__(vector_longinteger_t self, PySliceObject * slice) -> vector_longinteger_t __getitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i) -> std::vector< unsigned long >::value_type const & """ return _libBornAgainFit.vector_longinteger_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice, vector_longinteger_t v) - __setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_longinteger_t self, PySliceObject * slice, vector_longinteger_t v) + __setitem__(vector_longinteger_t self, PySliceObject * slice) __setitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i, std::vector< unsigned long >::value_type const & x) """ return _libBornAgainFit.vector_longinteger_t___setitem__(self, *args) @@ -1025,21 +1025,21 @@ class vector_complex_t(object): def __delitem__(self, *args): r""" __delitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i) - __delitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_complex_t self, PySliceObject * slice) """ return _libBornAgainFit.vector_complex_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) -> vector_complex_t + __getitem__(vector_complex_t self, PySliceObject * slice) -> vector_complex_t __getitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i) -> std::vector< std::complex< double > >::value_type const & """ return _libBornAgainFit.vector_complex_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice, vector_complex_t v) - __setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_complex_t self, PySliceObject * slice, vector_complex_t v) + __setitem__(vector_complex_t self, PySliceObject * slice) __setitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i, std::vector< std::complex< double > >::value_type const & x) """ return _libBornAgainFit.vector_complex_t___setitem__(self, *args) @@ -1191,21 +1191,21 @@ class vector_string_t(object): def __delitem__(self, *args): r""" __delitem__(vector_string_t self, std::vector< std::string >::difference_type i) - __delitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_string_t self, PySliceObject * slice) """ return _libBornAgainFit.vector_string_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) -> vector_string_t + __getitem__(vector_string_t self, PySliceObject * slice) -> vector_string_t __getitem__(vector_string_t self, std::vector< std::string >::difference_type i) -> std::vector< std::string >::value_type const & """ return _libBornAgainFit.vector_string_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice, vector_string_t v) - __setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_string_t self, PySliceObject * slice, vector_string_t v) + __setitem__(vector_string_t self, PySliceObject * slice) __setitem__(vector_string_t self, std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const & x) """ return _libBornAgainFit.vector_string_t___setitem__(self, *args) @@ -1540,21 +1540,21 @@ class vector_pvacuum_double_t(object): def __delitem__(self, *args): r""" __delitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i) - __delitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_pvacuum_double_t self, PySliceObject * slice) """ return _libBornAgainFit.vector_pvacuum_double_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) -> vector_pvacuum_double_t + __getitem__(vector_pvacuum_double_t self, PySliceObject * slice) -> vector_pvacuum_double_t __getitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i) -> pvacuum_double_t """ return _libBornAgainFit.vector_pvacuum_double_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice, vector_pvacuum_double_t v) - __setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_pvacuum_double_t self, PySliceObject * slice, vector_pvacuum_double_t v) + __setitem__(vector_pvacuum_double_t self, PySliceObject * slice) __setitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i, pvacuum_double_t x) """ return _libBornAgainFit.vector_pvacuum_double_t___setitem__(self, *args) diff --git a/auto/Wrap/libBornAgainFit_wrap.cpp b/auto/Wrap/libBornAgainFit_wrap.cpp index 70f8897d16e2755c4aaea3d2df85a4a34bc50520..a35897bbf2216091f00434a780a8543736a112d2 100644 --- a/auto/Wrap/libBornAgainFit_wrap.cpp +++ b/auto/Wrap/libBornAgainFit_wrap.cpp @@ -3606,9 +3606,9 @@ namespace swig { #include <iostream> #if PY_VERSION_HEX >= 0x03020000 -# define SWIGPY_SLICEOBJECT PyObject +# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) #else -# define SWIGPY_SLICEOBJECT PySliceObject +# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) #endif @@ -5421,46 +5421,46 @@ SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *sel SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice,std::vector< double,std::allocator< double > > const &v){ +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5557,46 +5557,46 @@ SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delslice__(std::vec SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5694,46 +5694,46 @@ SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std: SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice,std::vector< int,std::allocator< int > > const &v){ +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5795,46 +5795,46 @@ SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delslice__(std::vector SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< int > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &v){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< int > > *self,PySliceObject *slice,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< int > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< int > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5916,46 +5916,46 @@ SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delslice__(std::vector< uns SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_0(std::vector< unsigned long > *self,std::vector< unsigned long >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< unsigned long,std::allocator< unsigned long > > *std_vector_Sl_unsigned_SS_long_Sg____getitem____SWIG_0(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< unsigned long,std::allocator< unsigned long > > *std_vector_Sl_unsigned_SS_long_Sg____getitem____SWIG_0(std::vector< unsigned long > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_0(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice,std::vector< unsigned long,std::allocator< unsigned long > > const &v){ +SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_0(std::vector< unsigned long > *self,PySliceObject *slice,std::vector< unsigned long,std::allocator< unsigned long > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_1(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_1(std::vector< unsigned long > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_1(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_1(std::vector< unsigned long > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -6000,7 +6000,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_ (PyObject *o, std::complex<double>* val) SWIGINTERNINLINE PyObject* -SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/home/svechnikov/Projects/swig-4.1.0/installed/share/swig/4.1.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/ +SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/ const std::complex<double>& @@ -6068,46 +6068,46 @@ SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delslice__(std::ve SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::complex< double >,std::allocator< std::complex< double > > > *std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::complex< double >,std::allocator< std::complex< double > > > *std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::complex< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &v){ +SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::complex< double > > *self,PySliceObject *slice,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::complex< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::complex< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -6392,46 +6392,46 @@ SWIGINTERN void std_vector_Sl_std_string_Sg____delslice__(std::vector< std::stri SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::string,std::allocator< std::string > > const &v){ +SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice,std::vector< std::string,std::allocator< std::string > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -6921,46 +6921,46 @@ SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delslice__( SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_0(std::vector< std::pair< double,double > > *self,std::vector< std::pair< double,double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____getitem____SWIG_0(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____getitem____SWIG_0(std::vector< std::pair< double,double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_0(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &v){ +SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_0(std::vector< std::pair< double,double > > *self,PySliceObject *slice,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_1(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_1(std::vector< std::pair< double,double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_1(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_1(std::vector< std::pair< double,double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -8286,7 +8286,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< double,std::allocator< double > > *result = 0 ; @@ -8299,9 +8299,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___getitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getitem____SWIG_0(arg1,arg2); @@ -8320,7 +8320,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< double,std::allocator< double > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -8334,9 +8334,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; @@ -8368,7 +8368,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -8380,9 +8380,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2); @@ -8401,7 +8401,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -8413,9 +8413,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___delitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_double_Sg____delitem____SWIG_1(arg1,arg2); @@ -8471,7 +8471,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble1d_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::__delitem__(std::vector< double >::difference_type)\n" - " std::vector< double >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< double >::__delitem__(PySliceObject *)\n"); return 0; } @@ -8549,7 +8549,7 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___getitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble1d_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< double >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< double >::__getitem__(PySliceObject *)\n" " std::vector< double >::__getitem__(std::vector< double >::difference_type) const\n"); return 0; } @@ -8659,8 +8659,8 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble1d_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< double >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< double,std::allocator< double > > const &)\n" - " std::vector< double >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< double >::__setitem__(PySliceObject *,std::vector< double,std::allocator< double > > const &)\n" + " std::vector< double >::__setitem__(PySliceObject *)\n" " std::vector< double >::__setitem__(std::vector< double >::difference_type,std::vector< double >::value_type const &)\n"); return 0; } @@ -9712,7 +9712,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble1d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble1d_t" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10110,7 +10120,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; @@ -10123,9 +10133,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___getitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -10144,7 +10154,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -10158,9 +10168,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; @@ -10192,7 +10202,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -10204,9 +10214,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -10225,7 +10235,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -10237,9 +10247,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___delitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -10295,7 +10305,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble2d_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::vector< double > >::__delitem__(std::vector< std::vector< double > >::difference_type)\n" - " std::vector< std::vector< double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::vector< double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -10373,7 +10383,7 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___getitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble2d_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< double > >::__getitem__(PySliceObject *)\n" " std::vector< std::vector< double > >::__getitem__(std::vector< std::vector< double > >::difference_type) const\n"); return 0; } @@ -10486,8 +10496,8 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble2d_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n" - " std::vector< std::vector< double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< double > >::__setitem__(PySliceObject *,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n" + " std::vector< std::vector< double > >::__setitem__(PySliceObject *)\n" " std::vector< std::vector< double > >::__setitem__(std::vector< std::vector< double > >::difference_type,std::vector< std::vector< double > >::value_type const &)\n"); return 0; } @@ -11566,7 +11576,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble2d_t" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -11964,7 +11984,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< int,std::allocator< int > > *result = 0 ; @@ -11977,9 +11997,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___getitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2); @@ -11998,7 +12018,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< int,std::allocator< int > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -12012,9 +12032,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; @@ -12046,7 +12066,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -12058,9 +12078,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2); @@ -12079,7 +12099,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -12091,9 +12111,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___delitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2); @@ -12149,7 +12169,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_integer_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n" - " std::vector< int >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< int >::__delitem__(PySliceObject *)\n"); return 0; } @@ -12227,7 +12247,7 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___getitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_integer_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< int >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< int >::__getitem__(PySliceObject *)\n" " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n"); return 0; } @@ -12337,8 +12357,8 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___setitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_integer_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< int >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< int,std::allocator< int > > const &)\n" - " std::vector< int >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n" + " std::vector< int >::__setitem__(PySliceObject *)\n" " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n"); return 0; } @@ -13390,7 +13410,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_integer_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_integer_t" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -13788,7 +13818,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *result = 0 ; @@ -13801,9 +13831,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___getitem____SWIG_0(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *)std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -13822,7 +13852,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -13836,9 +13866,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_0(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *ptr = (std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *)0; @@ -13870,7 +13900,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -13882,9 +13912,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_1(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -13903,7 +13933,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -13915,9 +13945,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___delitem____SWIG_1(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -13973,7 +14003,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vinteger2d_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::vector< int > >::__delitem__(std::vector< std::vector< int > >::difference_type)\n" - " std::vector< std::vector< int > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::vector< int > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -14051,7 +14081,7 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___getitem__(PyObject *self, PyObject *ar fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vinteger2d_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< int > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< int > >::__getitem__(PySliceObject *)\n" " std::vector< std::vector< int > >::__getitem__(std::vector< std::vector< int > >::difference_type) const\n"); return 0; } @@ -14164,8 +14194,8 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem__(PyObject *self, PyObject *ar fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vinteger2d_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< int > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &)\n" - " std::vector< std::vector< int > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< int > >::__setitem__(PySliceObject *,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &)\n" + " std::vector< std::vector< int > >::__setitem__(PySliceObject *)\n" " std::vector< std::vector< int > >::__setitem__(std::vector< std::vector< int > >::difference_type,std::vector< std::vector< int > >::value_type const &)\n"); return 0; } @@ -15244,7 +15274,17 @@ SWIGINTERN PyObject *_wrap_delete_vinteger2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vinteger2d_t" "', argument " "1"" of type '" "std::vector< std::vector< int > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -15642,7 +15682,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< unsigned long,std::allocator< unsigned long > > *result = 0 ; @@ -15655,9 +15695,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___getitem____SWIG_0(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< unsigned long,std::allocator< unsigned long > > *)std_vector_Sl_unsigned_SS_long_Sg____getitem____SWIG_0(arg1,arg2); @@ -15676,7 +15716,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< unsigned long,std::allocator< unsigned long > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -15690,9 +15730,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_0(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< unsigned long,std::allocator< unsigned long > > *ptr = (std::vector< unsigned long,std::allocator< unsigned long > > *)0; @@ -15724,7 +15764,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -15736,9 +15776,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_1(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_1(arg1,arg2); @@ -15757,7 +15797,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -15769,9 +15809,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___delitem____SWIG_1(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_1(arg1,arg2); @@ -15827,7 +15867,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_longinteger_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< unsigned long >::__delitem__(std::vector< unsigned long >::difference_type)\n" - " std::vector< unsigned long >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< unsigned long >::__delitem__(PySliceObject *)\n"); return 0; } @@ -15905,7 +15945,7 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___getitem__(PyObject *self, PyOb fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_longinteger_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< unsigned long >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< unsigned long >::__getitem__(PySliceObject *)\n" " std::vector< unsigned long >::__getitem__(std::vector< unsigned long >::difference_type) const\n"); return 0; } @@ -16015,8 +16055,8 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem__(PyObject *self, PyOb fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_longinteger_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< unsigned long >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< unsigned long,std::allocator< unsigned long > > const &)\n" - " std::vector< unsigned long >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< unsigned long >::__setitem__(PySliceObject *,std::vector< unsigned long,std::allocator< unsigned long > > const &)\n" + " std::vector< unsigned long >::__setitem__(PySliceObject *)\n" " std::vector< unsigned long >::__setitem__(std::vector< unsigned long >::difference_type,std::vector< unsigned long >::value_type const &)\n"); return 0; } @@ -17068,7 +17108,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_longinteger_t(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_longinteger_t" "', argument " "1"" of type '" "std::vector< unsigned long > *""'"); } arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -17466,7 +17516,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::complex< double >,std::allocator< std::complex< double > > > *result = 0 ; @@ -17479,9 +17529,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___getitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -17500,7 +17550,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::complex< double >,std::allocator< std::complex< double > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -17514,9 +17564,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::complex< double >,std::allocator< std::complex< double > > > *ptr = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)0; @@ -17548,7 +17598,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -17560,9 +17610,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -17581,7 +17631,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -17593,9 +17643,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___delitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -17651,7 +17701,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_complex_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::complex< double > >::__delitem__(std::vector< std::complex< double > >::difference_type)\n" - " std::vector< std::complex< double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::complex< double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -17729,7 +17779,7 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___getitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_complex_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::complex< double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::complex< double > >::__getitem__(PySliceObject *)\n" " std::vector< std::complex< double > >::__getitem__(std::vector< std::complex< double > >::difference_type) const\n"); return 0; } @@ -17839,8 +17889,8 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___setitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_complex_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::complex< double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)\n" - " std::vector< std::complex< double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::complex< double > >::__setitem__(PySliceObject *,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)\n" + " std::vector< std::complex< double > >::__setitem__(PySliceObject *)\n" " std::vector< std::complex< double > >::__setitem__(std::vector< std::complex< double > >::difference_type,std::vector< std::complex< double > >::value_type const &)\n"); return 0; } @@ -18892,7 +18942,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_complex_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_complex_t" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -19290,7 +19350,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::string,std::allocator< std::string > > *result = 0 ; @@ -19303,9 +19363,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___getitem____SWIG_0(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg____getitem____SWIG_0(arg1,arg2); @@ -19324,7 +19384,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::string,std::allocator< std::string > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -19338,9 +19398,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_0(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; @@ -19372,7 +19432,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -19384,9 +19444,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_1(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_string_Sg____setitem____SWIG_1(arg1,arg2); @@ -19405,7 +19465,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -19417,9 +19477,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___delitem____SWIG_1(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_string_Sg____delitem____SWIG_1(arg1,arg2); @@ -19475,7 +19535,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_string_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::string >::__delitem__(std::vector< std::string >::difference_type)\n" - " std::vector< std::string >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::string >::__delitem__(PySliceObject *)\n"); return 0; } @@ -19553,7 +19613,7 @@ SWIGINTERN PyObject *_wrap_vector_string_t___getitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_string_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::string >::__getitem__(PySliceObject *)\n" " std::vector< std::string >::__getitem__(std::vector< std::string >::difference_type) const\n"); return 0; } @@ -19666,8 +19726,8 @@ SWIGINTERN PyObject *_wrap_vector_string_t___setitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_string_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::string,std::allocator< std::string > > const &)\n" - " std::vector< std::string >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::string >::__setitem__(PySliceObject *,std::vector< std::string,std::allocator< std::string > > const &)\n" + " std::vector< std::string >::__setitem__(PySliceObject *)\n" " std::vector< std::string >::__setitem__(std::vector< std::string >::difference_type,std::vector< std::string >::value_type const &)\n"); return 0; } @@ -20746,7 +20806,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_string_t(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_string_t" "', argument " "1"" of type '" "std::vector< std::string > *""'"); } arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -21955,7 +22025,17 @@ SWIGINTERN PyObject *_wrap_delete_map_string_double_t(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_string_double_t" "', argument " "1"" of type '" "std::map< std::string,double > *""'"); } arg1 = reinterpret_cast< std::map< std::string,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22208,7 +22288,17 @@ SWIGINTERN PyObject *_wrap_delete_pvacuum_double_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pvacuum_double_t" "', argument " "1"" of type '" "std::pair< double,double > *""'"); } arg1 = reinterpret_cast< std::pair< double,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22606,7 +22696,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *result = 0 ; @@ -22619,9 +22709,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___getitem____SWIG_0(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *)std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -22640,7 +22730,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -22654,9 +22744,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_0(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *ptr = (std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *)0; @@ -22688,7 +22778,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -22700,9 +22790,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_1(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -22721,7 +22811,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -22733,9 +22823,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___delitem____SWIG_1(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -22791,7 +22881,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_pvacuum_double_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::pair< double,double > >::__delitem__(std::vector< std::pair< double,double > >::difference_type)\n" - " std::vector< std::pair< double,double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::pair< double,double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -22869,7 +22959,7 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___getitem__(PyObject *self, P fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_pvacuum_double_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< double,double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::pair< double,double > >::__getitem__(PySliceObject *)\n" " std::vector< std::pair< double,double > >::__getitem__(std::vector< std::pair< double,double > >::difference_type) const\n"); return 0; } @@ -22982,8 +23072,8 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem__(PyObject *self, P fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_pvacuum_double_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< double,double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &)\n" - " std::vector< std::pair< double,double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::pair< double,double > >::__setitem__(PySliceObject *,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &)\n" + " std::vector< std::pair< double,double > >::__setitem__(PySliceObject *)\n" " std::vector< std::pair< double,double > >::__setitem__(std::vector< std::pair< double,double > >::difference_type,std::vector< std::pair< double,double > >::value_type const &)\n"); return 0; } @@ -24062,7 +24152,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_pvacuum_double_t(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_pvacuum_double_t" "', argument " "1"" of type '" "std::vector< std::pair< double,double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24086,7 +24186,17 @@ SWIGINTERN PyObject *_wrap_new_RealLimits(PyObject *self, PyObject *args) { RealLimits *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_RealLimits", 0, 0, 0)) SWIG_fail; - result = (RealLimits *)new RealLimits(); + { + try { + result = (RealLimits *)new RealLimits(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RealLimits, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24116,7 +24226,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_scaledLimits(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RealLimits_scaledLimits" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((RealLimits const *)arg1)->scaledLimits(arg2); + { + try { + result = ((RealLimits const *)arg1)->scaledLimits(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RealLimits(result)), SWIGTYPE_p_RealLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24139,7 +24259,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_hasLowerLimit(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_hasLowerLimit" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (bool)((RealLimits const *)arg1)->hasLowerLimit(); + { + try { + result = (bool)((RealLimits const *)arg1)->hasLowerLimit(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24162,7 +24292,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_lowerLimit(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_lowerLimit" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (double)((RealLimits const *)arg1)->lowerLimit(); + { + try { + result = (double)((RealLimits const *)arg1)->lowerLimit(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24191,7 +24331,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_setLowerLimit(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RealLimits_setLowerLimit" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setLowerLimit(arg2); + { + try { + (arg1)->setLowerLimit(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24213,7 +24363,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_removeLowerLimit(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_removeLowerLimit" "', argument " "1"" of type '" "RealLimits *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - (arg1)->removeLowerLimit(); + { + try { + (arg1)->removeLowerLimit(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24236,7 +24396,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_hasUpperLimit(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_hasUpperLimit" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (bool)((RealLimits const *)arg1)->hasUpperLimit(); + { + try { + result = (bool)((RealLimits const *)arg1)->hasUpperLimit(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24259,7 +24429,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_upperLimit(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_upperLimit" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (double)((RealLimits const *)arg1)->upperLimit(); + { + try { + result = (double)((RealLimits const *)arg1)->upperLimit(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24288,7 +24468,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_setUpperLimit(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RealLimits_setUpperLimit" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setUpperLimit(arg2); + { + try { + (arg1)->setUpperLimit(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24310,7 +24500,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_removeUpperLimit(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_removeUpperLimit" "', argument " "1"" of type '" "RealLimits *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - (arg1)->removeUpperLimit(); + { + try { + (arg1)->removeUpperLimit(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24333,7 +24533,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_hasLowerAndUpperLimits(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_hasLowerAndUpperLimits" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (bool)((RealLimits const *)arg1)->hasLowerAndUpperLimits(); + { + try { + result = (bool)((RealLimits const *)arg1)->hasLowerAndUpperLimits(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24370,7 +24580,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_setLimits(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RealLimits_setLimits" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->setLimits(arg2,arg3); + { + try { + (arg1)->setLimits(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24392,7 +24612,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_removeLimits(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_removeLimits" "', argument " "1"" of type '" "RealLimits *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - (arg1)->removeLimits(); + { + try { + (arg1)->removeLimits(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24422,7 +24652,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_isInRange(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RealLimits_isInRange" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (bool)((RealLimits const *)arg1)->isInRange(arg2); + { + try { + result = (bool)((RealLimits const *)arg1)->isInRange(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24445,7 +24685,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_lowerLimited(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "RealLimits_lowerLimited" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = RealLimits::lowerLimited(arg1); + { + try { + result = RealLimits::lowerLimited(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RealLimits(result)), SWIGTYPE_p_RealLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24458,7 +24708,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_positive(PyObject *self, PyObject *args) { RealLimits result; if (!SWIG_Python_UnpackTuple(args, "RealLimits_positive", 0, 0, 0)) SWIG_fail; - result = RealLimits::positive(); + { + try { + result = RealLimits::positive(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RealLimits(result)), SWIGTYPE_p_RealLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24471,7 +24731,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_nonnegative(PyObject *self, PyObject *args RealLimits result; if (!SWIG_Python_UnpackTuple(args, "RealLimits_nonnegative", 0, 0, 0)) SWIG_fail; - result = RealLimits::nonnegative(); + { + try { + result = RealLimits::nonnegative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RealLimits(result)), SWIGTYPE_p_RealLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24494,7 +24764,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_upperLimited(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "RealLimits_upperLimited" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = RealLimits::upperLimited(arg1); + { + try { + result = RealLimits::upperLimited(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RealLimits(result)), SWIGTYPE_p_RealLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24524,7 +24804,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_limited(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RealLimits_limited" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = RealLimits::limited(arg1,arg2); + { + try { + result = RealLimits::limited(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RealLimits(result)), SWIGTYPE_p_RealLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24537,7 +24827,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_limitless(PyObject *self, PyObject *args) RealLimits result; if (!SWIG_Python_UnpackTuple(args, "RealLimits_limitless", 0, 0, 0)) SWIG_fail; - result = RealLimits::limitless(); + { + try { + result = RealLimits::limitless(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RealLimits(result)), SWIGTYPE_p_RealLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24560,7 +24860,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_toString(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_toString" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = ((RealLimits const *)arg1)->toString(); + { + try { + result = ((RealLimits const *)arg1)->toString(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -24602,7 +24912,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_check(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RealLimits_check" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - ((RealLimits const *)arg1)->check((std::string const &)*arg2,arg3); + { + try { + ((RealLimits const *)arg1)->check((std::string const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -24637,7 +24957,17 @@ SWIGINTERN PyObject *_wrap_RealLimits___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RealLimits___eq__" "', argument " "2"" of type '" "RealLimits const &""'"); } arg2 = reinterpret_cast< RealLimits * >(argp2); - result = (bool)((RealLimits const *)arg1)->operator ==((RealLimits const &)*arg2); + { + try { + result = (bool)((RealLimits const *)arg1)->operator ==((RealLimits const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24672,7 +25002,17 @@ SWIGINTERN PyObject *_wrap_RealLimits___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RealLimits___ne__" "', argument " "2"" of type '" "RealLimits const &""'"); } arg2 = reinterpret_cast< RealLimits * >(argp2); - result = (bool)((RealLimits const *)arg1)->operator !=((RealLimits const &)*arg2); + { + try { + result = (bool)((RealLimits const *)arg1)->operator !=((RealLimits const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24697,7 +25037,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_isLimitless(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_isLimitless" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (bool)((RealLimits const *)arg1)->isLimitless(); + { + try { + result = (bool)((RealLimits const *)arg1)->isLimitless(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24720,7 +25070,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_isPositive(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_isPositive" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (bool)((RealLimits const *)arg1)->isPositive(); + { + try { + result = (bool)((RealLimits const *)arg1)->isPositive(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24743,7 +25103,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_isNonnegative(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_isNonnegative" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (bool)((RealLimits const *)arg1)->isNonnegative(); + { + try { + result = (bool)((RealLimits const *)arg1)->isNonnegative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24766,7 +25136,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_isLowerLimited(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_isLowerLimited" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (bool)((RealLimits const *)arg1)->isLowerLimited(); + { + try { + result = (bool)((RealLimits const *)arg1)->isLowerLimited(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24789,7 +25169,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_isUpperLimited(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_isUpperLimited" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (bool)((RealLimits const *)arg1)->isUpperLimited(); + { + try { + result = (bool)((RealLimits const *)arg1)->isUpperLimited(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24812,7 +25202,17 @@ SWIGINTERN PyObject *_wrap_RealLimits_isLimited(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealLimits_isLimited" "', argument " "1"" of type '" "RealLimits const *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - result = (bool)((RealLimits const *)arg1)->isLimited(); + { + try { + result = (bool)((RealLimits const *)arg1)->isLimited(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24834,7 +25234,17 @@ SWIGINTERN PyObject *_wrap_delete_RealLimits(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RealLimits" "', argument " "1"" of type '" "RealLimits *""'"); } arg1 = reinterpret_cast< RealLimits * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24858,7 +25268,17 @@ SWIGINTERN PyObject *_wrap_new_AttLimits(PyObject *self, PyObject *args) { AttLimits *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_AttLimits", 0, 0, 0)) SWIG_fail; - result = (AttLimits *)new AttLimits(); + { + try { + result = (AttLimits *)new AttLimits(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AttLimits, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24871,7 +25291,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_limitless(PyObject *self, PyObject *args) { AttLimits result; if (!SWIG_Python_UnpackTuple(args, "AttLimits_limitless", 0, 0, 0)) SWIG_fail; - result = AttLimits::limitless(); + { + try { + result = AttLimits::limitless(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new AttLimits(result)), SWIGTYPE_p_AttLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24894,7 +25324,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_lowerLimited(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AttLimits_lowerLimited" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = AttLimits::lowerLimited(arg1); + { + try { + result = AttLimits::lowerLimited(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new AttLimits(result)), SWIGTYPE_p_AttLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24907,7 +25347,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_positive(PyObject *self, PyObject *args) { AttLimits result; if (!SWIG_Python_UnpackTuple(args, "AttLimits_positive", 0, 0, 0)) SWIG_fail; - result = AttLimits::positive(); + { + try { + result = AttLimits::positive(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new AttLimits(result)), SWIGTYPE_p_AttLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24920,7 +25370,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_nonnegative(PyObject *self, PyObject *args) AttLimits result; if (!SWIG_Python_UnpackTuple(args, "AttLimits_nonnegative", 0, 0, 0)) SWIG_fail; - result = AttLimits::nonnegative(); + { + try { + result = AttLimits::nonnegative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new AttLimits(result)), SWIGTYPE_p_AttLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24943,7 +25403,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_upperLimited(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AttLimits_upperLimited" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = AttLimits::upperLimited(arg1); + { + try { + result = AttLimits::upperLimited(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new AttLimits(result)), SWIGTYPE_p_AttLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24973,7 +25443,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_limited(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AttLimits_limited" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = AttLimits::limited(arg1,arg2); + { + try { + result = AttLimits::limited(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new AttLimits(result)), SWIGTYPE_p_AttLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24986,7 +25466,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_fixed(PyObject *self, PyObject *args) { AttLimits result; if (!SWIG_Python_UnpackTuple(args, "AttLimits_fixed", 0, 0, 0)) SWIG_fail; - result = AttLimits::fixed(); + { + try { + result = AttLimits::fixed(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new AttLimits(result)), SWIGTYPE_p_AttLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25009,7 +25499,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_isFixed(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttLimits_isFixed" "', argument " "1"" of type '" "AttLimits const *""'"); } arg1 = reinterpret_cast< AttLimits * >(argp1); - result = (bool)((AttLimits const *)arg1)->isFixed(); + { + try { + result = (bool)((AttLimits const *)arg1)->isFixed(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25032,7 +25532,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_isLimited(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttLimits_isLimited" "', argument " "1"" of type '" "AttLimits const *""'"); } arg1 = reinterpret_cast< AttLimits * >(argp1); - result = (bool)((AttLimits const *)arg1)->isLimited(); + { + try { + result = (bool)((AttLimits const *)arg1)->isLimited(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25055,7 +25565,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_isUpperLimited(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttLimits_isUpperLimited" "', argument " "1"" of type '" "AttLimits const *""'"); } arg1 = reinterpret_cast< AttLimits * >(argp1); - result = (bool)((AttLimits const *)arg1)->isUpperLimited(); + { + try { + result = (bool)((AttLimits const *)arg1)->isUpperLimited(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25078,7 +25598,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_isLowerLimited(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttLimits_isLowerLimited" "', argument " "1"" of type '" "AttLimits const *""'"); } arg1 = reinterpret_cast< AttLimits * >(argp1); - result = (bool)((AttLimits const *)arg1)->isLowerLimited(); + { + try { + result = (bool)((AttLimits const *)arg1)->isLowerLimited(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25101,7 +25631,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_isLimitless(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttLimits_isLimitless" "', argument " "1"" of type '" "AttLimits const *""'"); } arg1 = reinterpret_cast< AttLimits * >(argp1); - result = (bool)((AttLimits const *)arg1)->isLimitless(); + { + try { + result = (bool)((AttLimits const *)arg1)->isLimitless(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25124,7 +25664,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_lowerLimit(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttLimits_lowerLimit" "', argument " "1"" of type '" "AttLimits const *""'"); } arg1 = reinterpret_cast< AttLimits * >(argp1); - result = (double)((AttLimits const *)arg1)->lowerLimit(); + { + try { + result = (double)((AttLimits const *)arg1)->lowerLimit(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25147,7 +25697,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_upperLimit(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttLimits_upperLimit" "', argument " "1"" of type '" "AttLimits const *""'"); } arg1 = reinterpret_cast< AttLimits * >(argp1); - result = (double)((AttLimits const *)arg1)->upperLimit(); + { + try { + result = (double)((AttLimits const *)arg1)->upperLimit(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25176,7 +25736,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_setFixed(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AttLimits_setFixed" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setFixed(arg2); + { + try { + (arg1)->setFixed(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25209,7 +25779,17 @@ SWIGINTERN PyObject *_wrap_AttLimits___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttLimits___eq__" "', argument " "2"" of type '" "AttLimits const &""'"); } arg2 = reinterpret_cast< AttLimits * >(argp2); - result = (bool)((AttLimits const *)arg1)->operator ==((AttLimits const &)*arg2); + { + try { + result = (bool)((AttLimits const *)arg1)->operator ==((AttLimits const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25244,7 +25824,17 @@ SWIGINTERN PyObject *_wrap_AttLimits___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AttLimits___ne__" "', argument " "2"" of type '" "AttLimits const &""'"); } arg2 = reinterpret_cast< AttLimits * >(argp2); - result = (bool)((AttLimits const *)arg1)->operator !=((AttLimits const &)*arg2); + { + try { + result = (bool)((AttLimits const *)arg1)->operator !=((AttLimits const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25269,7 +25859,17 @@ SWIGINTERN PyObject *_wrap_AttLimits_toString(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AttLimits_toString" "', argument " "1"" of type '" "AttLimits const *""'"); } arg1 = reinterpret_cast< AttLimits * >(argp1); - result = ((AttLimits const *)arg1)->toString(); + { + try { + result = ((AttLimits const *)arg1)->toString(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -25291,7 +25891,17 @@ SWIGINTERN PyObject *_wrap_delete_AttLimits(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AttLimits" "', argument " "1"" of type '" "AttLimits *""'"); } arg1 = reinterpret_cast< AttLimits * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25315,7 +25925,17 @@ SWIGINTERN PyObject *_wrap_new_Parameter__SWIG_0(PyObject *self, Py_ssize_t nobj mumufit::Parameter *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (mumufit::Parameter *)new mumufit::Parameter(); + { + try { + result = (mumufit::Parameter *)new mumufit::Parameter(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mumufit__Parameter, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25365,7 +25985,17 @@ SWIGINTERN PyObject *_wrap_new_Parameter__SWIG_1(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Parameter" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (mumufit::Parameter *)new mumufit::Parameter(arg1,arg2,(AttLimits const &)*arg3,arg4); + { + try { + result = (mumufit::Parameter *)new mumufit::Parameter(arg1,arg2,(AttLimits const &)*arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mumufit__Parameter, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25407,7 +26037,17 @@ SWIGINTERN PyObject *_wrap_new_Parameter__SWIG_2(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Parameter" "', argument " "3"" of type '" "AttLimits const &""'"); } arg3 = reinterpret_cast< AttLimits * >(argp3); - result = (mumufit::Parameter *)new mumufit::Parameter(arg1,arg2,(AttLimits const &)*arg3); + { + try { + result = (mumufit::Parameter *)new mumufit::Parameter(arg1,arg2,(AttLimits const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mumufit__Parameter, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25438,7 +26078,17 @@ SWIGINTERN PyObject *_wrap_new_Parameter__SWIG_3(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Parameter" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (mumufit::Parameter *)new mumufit::Parameter(arg1,arg2); + { + try { + result = (mumufit::Parameter *)new mumufit::Parameter(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mumufit__Parameter, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25540,7 +26190,17 @@ SWIGINTERN PyObject *_wrap_Parameter_name(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_name" "', argument " "1"" of type '" "mumufit::Parameter const *""'"); } arg1 = reinterpret_cast< mumufit::Parameter * >(argp1); - result = ((mumufit::Parameter const *)arg1)->name(); + { + try { + result = ((mumufit::Parameter const *)arg1)->name(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -25563,7 +26223,17 @@ SWIGINTERN PyObject *_wrap_Parameter_startValue(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_startValue" "', argument " "1"" of type '" "mumufit::Parameter const *""'"); } arg1 = reinterpret_cast< mumufit::Parameter * >(argp1); - result = (double)((mumufit::Parameter const *)arg1)->startValue(); + { + try { + result = (double)((mumufit::Parameter const *)arg1)->startValue(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25586,7 +26256,17 @@ SWIGINTERN PyObject *_wrap_Parameter_limits(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_limits" "', argument " "1"" of type '" "mumufit::Parameter const *""'"); } arg1 = reinterpret_cast< mumufit::Parameter * >(argp1); - result = ((mumufit::Parameter const *)arg1)->limits(); + { + try { + result = ((mumufit::Parameter const *)arg1)->limits(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new AttLimits(result)), SWIGTYPE_p_AttLimits, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25609,7 +26289,17 @@ SWIGINTERN PyObject *_wrap_Parameter_value(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_value" "', argument " "1"" of type '" "mumufit::Parameter const *""'"); } arg1 = reinterpret_cast< mumufit::Parameter * >(argp1); - result = (double)((mumufit::Parameter const *)arg1)->value(); + { + try { + result = (double)((mumufit::Parameter const *)arg1)->value(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25638,7 +26328,17 @@ SWIGINTERN PyObject *_wrap_Parameter_setValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parameter_setValue" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setValue(arg2); + { + try { + (arg1)->setValue(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25661,7 +26361,17 @@ SWIGINTERN PyObject *_wrap_Parameter_step(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_step" "', argument " "1"" of type '" "mumufit::Parameter const *""'"); } arg1 = reinterpret_cast< mumufit::Parameter * >(argp1); - result = (double)((mumufit::Parameter const *)arg1)->step(); + { + try { + result = (double)((mumufit::Parameter const *)arg1)->step(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25684,7 +26394,17 @@ SWIGINTERN PyObject *_wrap_Parameter_error(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_error" "', argument " "1"" of type '" "mumufit::Parameter const *""'"); } arg1 = reinterpret_cast< mumufit::Parameter * >(argp1); - result = (double)((mumufit::Parameter const *)arg1)->error(); + { + try { + result = (double)((mumufit::Parameter const *)arg1)->error(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25713,7 +26433,17 @@ SWIGINTERN PyObject *_wrap_Parameter_setError(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parameter_setError" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setError(arg2); + { + try { + (arg1)->setError(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25735,7 +26465,17 @@ SWIGINTERN PyObject *_wrap_delete_Parameter(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Parameter" "', argument " "1"" of type '" "mumufit::Parameter *""'"); } arg1 = reinterpret_cast< mumufit::Parameter * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25759,7 +26499,17 @@ SWIGINTERN PyObject *_wrap_new_Parameters(PyObject *self, PyObject *args) { mumufit::Parameters *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_Parameters", 0, 0, 0)) SWIG_fail; - result = (mumufit::Parameters *)new mumufit::Parameters(); + { + try { + result = (mumufit::Parameters *)new mumufit::Parameters(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mumufit__Parameters, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25791,7 +26541,17 @@ SWIGINTERN PyObject *_wrap_Parameters_add_cpp(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Parameters_add_cpp" "', argument " "2"" of type '" "mumufit::Parameter const &""'"); } arg2 = reinterpret_cast< mumufit::Parameter * >(argp2); - (arg1)->add((mumufit::Parameter const &)*arg2); + { + try { + (arg1)->add((mumufit::Parameter const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25812,7 +26572,17 @@ SWIGINTERN PyObject *_wrap_Parameters_begin__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameters_begin" "', argument " "1"" of type '" "mumufit::Parameters const *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - result = ((mumufit::Parameters const *)arg1)->begin(); + { + try { + result = ((mumufit::Parameters const *)arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::Parameters::const_iterator(result)), SWIGTYPE_p_std__vectorT_mumufit__Parameter_std__allocatorT_mumufit__Parameter_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25833,7 +26603,17 @@ SWIGINTERN PyObject *_wrap_Parameters_end__SWIG_0(PyObject *self, Py_ssize_t nob SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameters_end" "', argument " "1"" of type '" "mumufit::Parameters const *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - result = ((mumufit::Parameters const *)arg1)->end(); + { + try { + result = ((mumufit::Parameters const *)arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::Parameters::const_iterator(result)), SWIGTYPE_p_std__vectorT_mumufit__Parameter_std__allocatorT_mumufit__Parameter_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25854,7 +26634,17 @@ SWIGINTERN PyObject *_wrap_Parameters_begin__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameters_begin" "', argument " "1"" of type '" "mumufit::Parameters *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - result = (arg1)->begin(); + { + try { + result = (arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::Parameters::iterator(result)), SWIGTYPE_p_std__vectorT_mumufit__Parameter_std__allocatorT_mumufit__Parameter_t_t__iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25911,7 +26701,17 @@ SWIGINTERN PyObject *_wrap_Parameters_end__SWIG_1(PyObject *self, Py_ssize_t nob SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameters_end" "', argument " "1"" of type '" "mumufit::Parameters *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - result = (arg1)->end(); + { + try { + result = (arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::Parameters::iterator(result)), SWIGTYPE_p_std__vectorT_mumufit__Parameter_std__allocatorT_mumufit__Parameter_t_t__iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25970,7 +26770,17 @@ SWIGINTERN PyObject *_wrap_Parameters_size(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameters_size" "', argument " "1"" of type '" "mumufit::Parameters const *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - result = ((mumufit::Parameters const *)arg1)->size(); + { + try { + result = ((mumufit::Parameters const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -25993,7 +26803,17 @@ SWIGINTERN PyObject *_wrap_Parameters_values(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameters_values" "', argument " "1"" of type '" "mumufit::Parameters const *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - result = ((mumufit::Parameters const *)arg1)->values(); + { + try { + result = ((mumufit::Parameters const *)arg1)->values(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -26027,7 +26847,17 @@ SWIGINTERN PyObject *_wrap_Parameters_setValues(PyObject *self, PyObject *args) } arg2 = ptr; } - (arg1)->setValues((std::vector< double,std::allocator< double > > const &)*arg2); + { + try { + (arg1)->setValues((std::vector< double,std::allocator< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -26052,7 +26882,17 @@ SWIGINTERN PyObject *_wrap_Parameters_errors(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameters_errors" "', argument " "1"" of type '" "mumufit::Parameters const *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - result = ((mumufit::Parameters const *)arg1)->errors(); + { + try { + result = ((mumufit::Parameters const *)arg1)->errors(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -26086,7 +26926,17 @@ SWIGINTERN PyObject *_wrap_Parameters_setErrors(PyObject *self, PyObject *args) } arg2 = ptr; } - (arg1)->setErrors((std::vector< double,std::allocator< double > > const &)*arg2); + { + try { + (arg1)->setErrors((std::vector< double,std::allocator< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -26111,7 +26961,17 @@ SWIGINTERN PyObject *_wrap_Parameters_correlationMatrix(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameters_correlationMatrix" "', argument " "1"" of type '" "mumufit::Parameters const *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - result = ((mumufit::Parameters const *)arg1)->correlationMatrix(); + { + try { + result = ((mumufit::Parameters const *)arg1)->correlationMatrix(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > >(result)); return resultobj; fail: @@ -26145,7 +27005,17 @@ SWIGINTERN PyObject *_wrap_Parameters_setCorrelationMatrix(PyObject *self, PyObj } arg2 = ptr; } - (arg1)->setCorrelationMatrix((mumufit::Parameters::corr_matrix_t const &)*arg2); + { + try { + (arg1)->setCorrelationMatrix((mumufit::Parameters::corr_matrix_t const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -26170,7 +27040,17 @@ SWIGINTERN PyObject *_wrap_Parameters_freeParameterCount(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameters_freeParameterCount" "', argument " "1"" of type '" "mumufit::Parameters const *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - result = ((mumufit::Parameters const *)arg1)->freeParameterCount(); + { + try { + result = ((mumufit::Parameters const *)arg1)->freeParameterCount(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26201,7 +27081,17 @@ SWIGINTERN PyObject *_wrap_Parameters___getitem____SWIG_0(PyObject *self, Py_ssi arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (mumufit::Parameter *) &mumufit_Parameters___getitem____SWIG_0((mumufit::Parameters const *)arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = (mumufit::Parameter *) &mumufit_Parameters___getitem____SWIG_0((mumufit::Parameters const *)arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mumufit__Parameter, 0 | 0 ); return resultobj; fail: @@ -26230,7 +27120,17 @@ SWIGINTERN PyObject *_wrap_Parameters___getitem____SWIG_1(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parameters___getitem__" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (mumufit::Parameter *) &mumufit_Parameters___getitem____SWIG_1((mumufit::Parameters const *)arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = (mumufit::Parameter *) &mumufit_Parameters___getitem____SWIG_1((mumufit::Parameters const *)arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mumufit__Parameter, 0 | 0 ); return resultobj; fail: @@ -26298,7 +27198,17 @@ SWIGINTERN PyObject *_wrap_delete_Parameters(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Parameters" "', argument " "1"" of type '" "mumufit::Parameters *""'"); } arg1 = reinterpret_cast< mumufit::Parameters * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26331,7 +27241,17 @@ SWIGINTERN PyObject *_wrap_delete_IMinimizer(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IMinimizer" "', argument " "1"" of type '" "IMinimizer *""'"); } arg1 = reinterpret_cast< IMinimizer * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26354,7 +27274,17 @@ SWIGINTERN PyObject *_wrap_IMinimizer_minimizerName(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMinimizer_minimizerName" "', argument " "1"" of type '" "IMinimizer const *""'"); } arg1 = reinterpret_cast< IMinimizer * >(argp1); - result = ((IMinimizer const *)arg1)->minimizerName(); + { + try { + result = ((IMinimizer const *)arg1)->minimizerName(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -26377,7 +27307,17 @@ SWIGINTERN PyObject *_wrap_IMinimizer_algorithmName(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMinimizer_algorithmName" "', argument " "1"" of type '" "IMinimizer const *""'"); } arg1 = reinterpret_cast< IMinimizer * >(argp1); - result = ((IMinimizer const *)arg1)->algorithmName(); + { + try { + result = ((IMinimizer const *)arg1)->algorithmName(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -26431,7 +27371,17 @@ SWIGINTERN PyObject *_wrap_IMinimizer_minimize_scalar(PyObject *self, PyObject * if (SWIG_IsNewObj(res3)) delete temp; } } - result = (arg1)->minimize_scalar(arg2,arg3); + { + try { + result = (arg1)->minimize_scalar(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::MinimizerResult(result)), SWIGTYPE_p_mumufit__MinimizerResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26485,7 +27435,17 @@ SWIGINTERN PyObject *_wrap_IMinimizer_minimize_residual(PyObject *self, PyObject if (SWIG_IsNewObj(res3)) delete temp; } } - result = (arg1)->minimize_residual(arg2,arg3); + { + try { + result = (arg1)->minimize_residual(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::MinimizerResult(result)), SWIGTYPE_p_mumufit__MinimizerResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26507,7 +27467,17 @@ SWIGINTERN PyObject *_wrap_IMinimizer_clear(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMinimizer_clear" "', argument " "1"" of type '" "IMinimizer *""'"); } arg1 = reinterpret_cast< IMinimizer * >(argp1); - (arg1)->clear(); + { + try { + (arg1)->clear(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26530,7 +27500,17 @@ SWIGINTERN PyObject *_wrap_IMinimizer_minValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMinimizer_minValue" "', argument " "1"" of type '" "IMinimizer const *""'"); } arg1 = reinterpret_cast< IMinimizer * >(argp1); - result = (double)((IMinimizer const *)arg1)->minValue(); + { + try { + result = (double)((IMinimizer const *)arg1)->minValue(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26564,7 +27544,17 @@ SWIGINTERN PyObject *_wrap_IMinimizer_setOptions(PyObject *self, PyObject *args) } arg2 = ptr; } - (arg1)->setOptions((std::string const &)*arg2); + { + try { + (arg1)->setOptions((std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -26586,7 +27576,17 @@ SWIGINTERN PyObject *_wrap_new_MinimizerCatalog__SWIG_0(PyObject *self, Py_ssize MinimizerCatalog *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (MinimizerCatalog *)new MinimizerCatalog(); + { + try { + result = (MinimizerCatalog *)new MinimizerCatalog(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MinimizerCatalog, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26616,7 +27616,17 @@ SWIGINTERN PyObject *_wrap_new_MinimizerCatalog__SWIG_1(PyObject *self, Py_ssize } arg1 = reinterpret_cast< MinimizerCatalog * >(argp1); rvrdeleter1.reset(arg1); - result = (MinimizerCatalog *)new MinimizerCatalog((MinimizerCatalog &&)*arg1); + { + try { + result = (MinimizerCatalog *)new MinimizerCatalog((MinimizerCatalog &&)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MinimizerCatalog, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26669,7 +27679,17 @@ SWIGINTERN PyObject *_wrap_MinimizerCatalog_toString(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MinimizerCatalog_toString" "', argument " "1"" of type '" "MinimizerCatalog const *""'"); } arg1 = reinterpret_cast< MinimizerCatalog * >(argp1); - result = ((MinimizerCatalog const *)arg1)->toString(); + { + try { + result = ((MinimizerCatalog const *)arg1)->toString(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -26692,7 +27712,17 @@ SWIGINTERN PyObject *_wrap_MinimizerCatalog_minimizerNames(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MinimizerCatalog_minimizerNames" "', argument " "1"" of type '" "MinimizerCatalog const *""'"); } arg1 = reinterpret_cast< MinimizerCatalog * >(argp1); - result = ((MinimizerCatalog const *)arg1)->minimizerNames(); + { + try { + result = ((MinimizerCatalog const *)arg1)->minimizerNames(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::string,std::allocator< std::string > > >(result)); return resultobj; fail: @@ -26727,7 +27757,17 @@ SWIGINTERN PyObject *_wrap_MinimizerCatalog_algorithmNames(PyObject *self, PyObj } arg2 = ptr; } - result = ((MinimizerCatalog const *)arg1)->algorithmNames((std::string const &)*arg2); + { + try { + result = ((MinimizerCatalog const *)arg1)->algorithmNames((std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::string,std::allocator< std::string > > >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -26764,7 +27804,17 @@ SWIGINTERN PyObject *_wrap_MinimizerCatalog_algorithmDescriptions(PyObject *self } arg2 = ptr; } - result = ((MinimizerCatalog const *)arg1)->algorithmDescriptions((std::string const &)*arg2); + { + try { + result = ((MinimizerCatalog const *)arg1)->algorithmDescriptions((std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::string,std::allocator< std::string > > >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -26801,7 +27851,17 @@ SWIGINTERN PyObject *_wrap_MinimizerCatalog_minimizerInfo(PyObject *self, PyObje } arg2 = ptr; } - result = (MinimizerInfo *) &((MinimizerCatalog const *)arg1)->minimizerInfo((std::string const &)*arg2); + { + try { + result = (MinimizerInfo *) &((MinimizerCatalog const *)arg1)->minimizerInfo((std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MinimizerInfo, 0 | 0 ); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -26825,7 +27885,17 @@ SWIGINTERN PyObject *_wrap_delete_MinimizerCatalog(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MinimizerCatalog" "', argument " "1"" of type '" "MinimizerCatalog *""'"); } arg1 = reinterpret_cast< MinimizerCatalog * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26849,7 +27919,17 @@ SWIGINTERN PyObject *_wrap_new_MinimizerResult(PyObject *self, PyObject *args) { mumufit::MinimizerResult *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_MinimizerResult", 0, 0, 0)) SWIG_fail; - result = (mumufit::MinimizerResult *)new mumufit::MinimizerResult(); + { + try { + result = (mumufit::MinimizerResult *)new mumufit::MinimizerResult(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mumufit__MinimizerResult, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26881,7 +27961,17 @@ SWIGINTERN PyObject *_wrap_MinimizerResult_setParameters(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MinimizerResult_setParameters" "', argument " "2"" of type '" "mumufit::Parameters const &""'"); } arg2 = reinterpret_cast< mumufit::Parameters * >(argp2); - (arg1)->setParameters((mumufit::Parameters const &)*arg2); + { + try { + (arg1)->setParameters((mumufit::Parameters const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26904,7 +27994,17 @@ SWIGINTERN PyObject *_wrap_MinimizerResult_parameters(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MinimizerResult_parameters" "', argument " "1"" of type '" "mumufit::MinimizerResult const *""'"); } arg1 = reinterpret_cast< mumufit::MinimizerResult * >(argp1); - result = ((mumufit::MinimizerResult const *)arg1)->parameters(); + { + try { + result = ((mumufit::MinimizerResult const *)arg1)->parameters(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::Parameters(result)), SWIGTYPE_p_mumufit__Parameters, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26933,7 +28033,17 @@ SWIGINTERN PyObject *_wrap_MinimizerResult_setMinValue(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MinimizerResult_setMinValue" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setMinValue(arg2); + { + try { + (arg1)->setMinValue(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26956,7 +28066,17 @@ SWIGINTERN PyObject *_wrap_MinimizerResult_minValue(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MinimizerResult_minValue" "', argument " "1"" of type '" "mumufit::MinimizerResult const *""'"); } arg1 = reinterpret_cast< mumufit::MinimizerResult * >(argp1); - result = (double)((mumufit::MinimizerResult const *)arg1)->minValue(); + { + try { + result = (double)((mumufit::MinimizerResult const *)arg1)->minValue(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26979,7 +28099,17 @@ SWIGINTERN PyObject *_wrap_MinimizerResult_toString(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MinimizerResult_toString" "', argument " "1"" of type '" "mumufit::MinimizerResult const *""'"); } arg1 = reinterpret_cast< mumufit::MinimizerResult * >(argp1); - result = ((mumufit::MinimizerResult const *)arg1)->toString(); + { + try { + result = ((mumufit::MinimizerResult const *)arg1)->toString(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -27013,7 +28143,17 @@ SWIGINTERN PyObject *_wrap_MinimizerResult_setReport(PyObject *self, PyObject *a } arg2 = ptr; } - (arg1)->setReport((std::string const &)*arg2); + { + try { + (arg1)->setReport((std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -27044,7 +28184,17 @@ SWIGINTERN PyObject *_wrap_MinimizerResult_setDuration(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MinimizerResult_setDuration" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setDuration(arg2); + { + try { + (arg1)->setDuration(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27073,7 +28223,17 @@ SWIGINTERN PyObject *_wrap_MinimizerResult_setNumberOfCalls(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MinimizerResult_setNumberOfCalls" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); - (arg1)->setNumberOfCalls(arg2); + { + try { + (arg1)->setNumberOfCalls(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27102,7 +28262,17 @@ SWIGINTERN PyObject *_wrap_MinimizerResult_setNumberOfGradientCalls(PyObject *se SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MinimizerResult_setNumberOfGradientCalls" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); - (arg1)->setNumberOfGradientCalls(arg2); + { + try { + (arg1)->setNumberOfGradientCalls(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27124,7 +28294,17 @@ SWIGINTERN PyObject *_wrap_delete_MinimizerResult(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MinimizerResult" "', argument " "1"" of type '" "mumufit::MinimizerResult *""'"); } arg1 = reinterpret_cast< mumufit::MinimizerResult * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27148,7 +28328,17 @@ SWIGINTERN PyObject *_wrap_new_Minimizer(PyObject *self, PyObject *args) { mumufit::Minimizer *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_Minimizer", 0, 0, 0)) SWIG_fail; - result = (mumufit::Minimizer *)new mumufit::Minimizer(); + { + try { + result = (mumufit::Minimizer *)new mumufit::Minimizer(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mumufit__Minimizer, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27170,7 +28360,17 @@ SWIGINTERN PyObject *_wrap_delete_Minimizer(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Minimizer" "', argument " "1"" of type '" "mumufit::Minimizer *""'"); } arg1 = reinterpret_cast< mumufit::Minimizer * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27229,7 +28429,17 @@ SWIGINTERN PyObject *_wrap_Minimizer_setMinimizer__SWIG_0(PyObject *self, Py_ssi } arg4 = ptr; } - (arg1)->setMinimizer((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4); + { + try { + (arg1)->setMinimizer((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; if (SWIG_IsNewObj(res3)) delete arg3; @@ -27281,7 +28491,17 @@ SWIGINTERN PyObject *_wrap_Minimizer_setMinimizer__SWIG_1(PyObject *self, Py_ssi } arg3 = ptr; } - (arg1)->setMinimizer((std::string const &)*arg2,(std::string const &)*arg3); + { + try { + (arg1)->setMinimizer((std::string const &)*arg2,(std::string const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; if (SWIG_IsNewObj(res3)) delete arg3; @@ -27318,7 +28538,17 @@ SWIGINTERN PyObject *_wrap_Minimizer_setMinimizer__SWIG_2(PyObject *self, Py_ssi } arg2 = ptr; } - (arg1)->setMinimizer((std::string const &)*arg2); + { + try { + (arg1)->setMinimizer((std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -27348,7 +28578,17 @@ SWIGINTERN PyObject *_wrap_Minimizer_setMinimizer__SWIG_3(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Minimizer_setMinimizer" "', argument " "2"" of type '" "IMinimizer *""'"); } arg2 = reinterpret_cast< IMinimizer * >(argp2); - (arg1)->setMinimizer(arg2); + { + try { + (arg1)->setMinimizer(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27477,7 +28717,17 @@ SWIGINTERN PyObject *_wrap_Minimizer_minimize_cpp(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Minimizer_minimize_cpp" "', argument " "3"" of type '" "mumufit::Parameters const &""'"); } arg3 = reinterpret_cast< mumufit::Parameters * >(argp3); - result = ((mumufit::Minimizer const *)arg1)->minimize((PyCallback const &)*arg2,(mumufit::Parameters const &)*arg3); + { + try { + result = ((mumufit::Minimizer const *)arg1)->minimize((PyCallback const &)*arg2,(mumufit::Parameters const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::MinimizerResult(result)), SWIGTYPE_p_mumufit__MinimizerResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27540,7 +28790,17 @@ SWIGINTERN PyObject *_wrap_MinimizerFactory_createMinimizer__SWIG_0(PyObject *se } arg3 = ptr; } - result = (IMinimizer *)MinimizerFactory::createMinimizer((std::string const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3); + { + try { + result = (IMinimizer *)MinimizerFactory::createMinimizer((std::string const &)*arg1,(std::string const &)*arg2,(std::string const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMinimizer, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; if (SWIG_IsNewObj(res2)) delete arg2; @@ -27585,7 +28845,17 @@ SWIGINTERN PyObject *_wrap_MinimizerFactory_createMinimizer__SWIG_1(PyObject *se } arg2 = ptr; } - result = (IMinimizer *)MinimizerFactory::createMinimizer((std::string const &)*arg1,(std::string const &)*arg2); + { + try { + result = (IMinimizer *)MinimizerFactory::createMinimizer((std::string const &)*arg1,(std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMinimizer, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; if (SWIG_IsNewObj(res2)) delete arg2; @@ -27615,7 +28885,17 @@ SWIGINTERN PyObject *_wrap_MinimizerFactory_createMinimizer__SWIG_2(PyObject *se } arg1 = ptr; } - result = (IMinimizer *)MinimizerFactory::createMinimizer((std::string const &)*arg1); + { + try { + result = (IMinimizer *)MinimizerFactory::createMinimizer((std::string const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMinimizer, 0 | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -27684,7 +28964,17 @@ SWIGINTERN PyObject *_wrap_MinimizerFactory_printCatalog(PyObject *self, PyObjec PyObject *resultobj = 0; if (!SWIG_Python_UnpackTuple(args, "MinimizerFactory_printCatalog", 0, 0, 0)) SWIG_fail; - MinimizerFactory::printCatalog(); + { + try { + MinimizerFactory::printCatalog(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27697,7 +28987,17 @@ SWIGINTERN PyObject *_wrap_MinimizerFactory_catalogToString(PyObject *self, PyOb std::string result; if (!SWIG_Python_UnpackTuple(args, "MinimizerFactory_catalogToString", 0, 0, 0)) SWIG_fail; - result = MinimizerFactory::catalogToString(); + { + try { + result = MinimizerFactory::catalogToString(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -27710,7 +29010,17 @@ SWIGINTERN PyObject *_wrap_MinimizerFactory_catalogDetailsToString(PyObject *sel std::string result; if (!SWIG_Python_UnpackTuple(args, "MinimizerFactory_catalogDetailsToString", 0, 0, 0)) SWIG_fail; - result = MinimizerFactory::catalogDetailsToString(); + { + try { + result = MinimizerFactory::catalogDetailsToString(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -27723,7 +29033,17 @@ SWIGINTERN PyObject *_wrap_MinimizerFactory_catalog(PyObject *self, PyObject *ar MinimizerCatalog *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "MinimizerFactory_catalog", 0, 0, 0)) SWIG_fail; - result = (MinimizerCatalog *) &MinimizerFactory::catalog(); + { + try { + result = (MinimizerCatalog *) &MinimizerFactory::catalog(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MinimizerCatalog, 0 | 0 ); return resultobj; fail: @@ -27736,7 +29056,17 @@ SWIGINTERN PyObject *_wrap_new_MinimizerFactory(PyObject *self, PyObject *args) MinimizerFactory *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_MinimizerFactory", 0, 0, 0)) SWIG_fail; - result = (MinimizerFactory *)new MinimizerFactory(); + { + try { + result = (MinimizerFactory *)new MinimizerFactory(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MinimizerFactory, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27758,7 +29088,17 @@ SWIGINTERN PyObject *_wrap_delete_MinimizerFactory(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MinimizerFactory" "', argument " "1"" of type '" "MinimizerFactory *""'"); } arg1 = reinterpret_cast< MinimizerFactory * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27792,13 +29132,23 @@ SWIGINTERN PyObject *_wrap_new_PyCallback__SWIG_0(PyObject *self, Py_ssize_t nob SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PyCallback" "', argument " "2"" of type '" "PyCallback::CallbackType""'"); } arg2 = static_cast< PyCallback::CallbackType >(val2); - if ( arg1 != Py_None ) { - /* subclassed */ - result = (PyCallback *)new SwigDirector_PyCallback(arg1,arg2); - } else { - result = (PyCallback *)new PyCallback(arg2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (PyCallback *)new SwigDirector_PyCallback(arg1,arg2); + } else { + result = (PyCallback *)new PyCallback(arg2); + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PyCallback, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27813,13 +29163,23 @@ SWIGINTERN PyObject *_wrap_new_PyCallback__SWIG_1(PyObject *self, Py_ssize_t nob if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; arg1 = swig_obj[0]; - if ( arg1 != Py_None ) { - /* subclassed */ - result = (PyCallback *)new SwigDirector_PyCallback(arg1); - } else { - result = (PyCallback *)new PyCallback(); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (PyCallback *)new SwigDirector_PyCallback(arg1); + } else { + result = (PyCallback *)new PyCallback(); + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PyCallback, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27879,7 +29239,17 @@ SWIGINTERN PyObject *_wrap_delete_PyCallback(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PyCallback" "', argument " "1"" of type '" "PyCallback *""'"); } arg1 = reinterpret_cast< PyCallback * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27902,7 +29272,17 @@ SWIGINTERN PyObject *_wrap_PyCallback_callback_type(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PyCallback_callback_type" "', argument " "1"" of type '" "PyCallback const *""'"); } arg1 = reinterpret_cast< PyCallback * >(argp1); - result = (PyCallback::CallbackType)((PyCallback const *)arg1)->callback_type(); + { + try { + result = (PyCallback::CallbackType)((PyCallback const *)arg1)->callback_type(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -27945,10 +29325,20 @@ SWIGINTERN PyObject *_wrap_PyCallback_call_scalar(PyObject *self, PyObject *args director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = (double)((PyCallback const *)arg1)->PyCallback::call_scalar(arg2); - } else { - result = (double)((PyCallback const *)arg1)->call_scalar(arg2); + { + try { + if (upcall) { + result = (double)((PyCallback const *)arg1)->PyCallback::call_scalar(arg2); + } else { + result = (double)((PyCallback const *)arg1)->call_scalar(arg2); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -27995,10 +29385,20 @@ SWIGINTERN PyObject *_wrap_PyCallback_call_residuals(PyObject *self, PyObject *a director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = ((PyCallback const *)arg1)->PyCallback::call_residuals(arg2); - } else { - result = ((PyCallback const *)arg1)->call_residuals(arg2); + { + try { + if (upcall) { + result = ((PyCallback const *)arg1)->PyCallback::call_residuals(arg2); + } else { + result = ((PyCallback const *)arg1)->call_residuals(arg2); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -28081,15 +29481,15 @@ static PyMethodDef SwigMethods[] = { { "vdouble1d_t___delslice__", _wrap_vdouble1d_t___delslice__, METH_VARARGS, "vdouble1d_t___delslice__(vdouble1d_t self, std::vector< double >::difference_type i, std::vector< double >::difference_type j)"}, { "vdouble1d_t___delitem__", _wrap_vdouble1d_t___delitem__, METH_VARARGS, "\n" "vdouble1d_t___delitem__(vdouble1d_t self, std::vector< double >::difference_type i)\n" - "vdouble1d_t___delitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble1d_t___delitem__(vdouble1d_t self, PySliceObject * slice)\n" ""}, { "vdouble1d_t___getitem__", _wrap_vdouble1d_t___getitem__, METH_VARARGS, "\n" - "vdouble1d_t___getitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble1d_t\n" + "vdouble1d_t___getitem__(vdouble1d_t self, PySliceObject * slice) -> vdouble1d_t\n" "vdouble1d_t___getitem__(vdouble1d_t self, std::vector< double >::difference_type i) -> std::vector< double >::value_type const &\n" ""}, { "vdouble1d_t___setitem__", _wrap_vdouble1d_t___setitem__, METH_VARARGS, "\n" - "vdouble1d_t___setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice, vdouble1d_t v)\n" - "vdouble1d_t___setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble1d_t___setitem__(vdouble1d_t self, PySliceObject * slice, vdouble1d_t v)\n" + "vdouble1d_t___setitem__(vdouble1d_t self, PySliceObject * slice)\n" "vdouble1d_t___setitem__(vdouble1d_t self, std::vector< double >::difference_type i, std::vector< double >::value_type const & x)\n" ""}, { "vdouble1d_t_pop", _wrap_vdouble1d_t_pop, METH_O, "vdouble1d_t_pop(vdouble1d_t self) -> std::vector< double >::value_type"}, @@ -28143,15 +29543,15 @@ static PyMethodDef SwigMethods[] = { { "vdouble2d_t___delslice__", _wrap_vdouble2d_t___delslice__, METH_VARARGS, "vdouble2d_t___delslice__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::difference_type j)"}, { "vdouble2d_t___delitem__", _wrap_vdouble2d_t___delitem__, METH_VARARGS, "\n" "vdouble2d_t___delitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i)\n" - "vdouble2d_t___delitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble2d_t___delitem__(vdouble2d_t self, PySliceObject * slice)\n" ""}, { "vdouble2d_t___getitem__", _wrap_vdouble2d_t___getitem__, METH_VARARGS, "\n" - "vdouble2d_t___getitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble2d_t\n" + "vdouble2d_t___getitem__(vdouble2d_t self, PySliceObject * slice) -> vdouble2d_t\n" "vdouble2d_t___getitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i) -> vdouble1d_t\n" ""}, { "vdouble2d_t___setitem__", _wrap_vdouble2d_t___setitem__, METH_VARARGS, "\n" - "vdouble2d_t___setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice, vdouble2d_t v)\n" - "vdouble2d_t___setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble2d_t___setitem__(vdouble2d_t self, PySliceObject * slice, vdouble2d_t v)\n" + "vdouble2d_t___setitem__(vdouble2d_t self, PySliceObject * slice)\n" "vdouble2d_t___setitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i, vdouble1d_t x)\n" ""}, { "vdouble2d_t_pop", _wrap_vdouble2d_t_pop, METH_O, "vdouble2d_t_pop(vdouble2d_t self) -> vdouble1d_t"}, @@ -28205,15 +29605,15 @@ static PyMethodDef SwigMethods[] = { { "vector_integer_t___delslice__", _wrap_vector_integer_t___delslice__, METH_VARARGS, "vector_integer_t___delslice__(vector_integer_t self, std::vector< int >::difference_type i, std::vector< int >::difference_type j)"}, { "vector_integer_t___delitem__", _wrap_vector_integer_t___delitem__, METH_VARARGS, "\n" "vector_integer_t___delitem__(vector_integer_t self, std::vector< int >::difference_type i)\n" - "vector_integer_t___delitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_integer_t___delitem__(vector_integer_t self, PySliceObject * slice)\n" ""}, { "vector_integer_t___getitem__", _wrap_vector_integer_t___getitem__, METH_VARARGS, "\n" - "vector_integer_t___getitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) -> vector_integer_t\n" + "vector_integer_t___getitem__(vector_integer_t self, PySliceObject * slice) -> vector_integer_t\n" "vector_integer_t___getitem__(vector_integer_t self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const &\n" ""}, { "vector_integer_t___setitem__", _wrap_vector_integer_t___setitem__, METH_VARARGS, "\n" - "vector_integer_t___setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice, vector_integer_t v)\n" - "vector_integer_t___setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_integer_t___setitem__(vector_integer_t self, PySliceObject * slice, vector_integer_t v)\n" + "vector_integer_t___setitem__(vector_integer_t self, PySliceObject * slice)\n" "vector_integer_t___setitem__(vector_integer_t self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x)\n" ""}, { "vector_integer_t_pop", _wrap_vector_integer_t_pop, METH_O, "vector_integer_t_pop(vector_integer_t self) -> std::vector< int >::value_type"}, @@ -28267,15 +29667,15 @@ static PyMethodDef SwigMethods[] = { { "vinteger2d_t___delslice__", _wrap_vinteger2d_t___delslice__, METH_VARARGS, "vinteger2d_t___delslice__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i, std::vector< std::vector< int > >::difference_type j)"}, { "vinteger2d_t___delitem__", _wrap_vinteger2d_t___delitem__, METH_VARARGS, "\n" "vinteger2d_t___delitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i)\n" - "vinteger2d_t___delitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vinteger2d_t___delitem__(vinteger2d_t self, PySliceObject * slice)\n" ""}, { "vinteger2d_t___getitem__", _wrap_vinteger2d_t___getitem__, METH_VARARGS, "\n" - "vinteger2d_t___getitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) -> vinteger2d_t\n" + "vinteger2d_t___getitem__(vinteger2d_t self, PySliceObject * slice) -> vinteger2d_t\n" "vinteger2d_t___getitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i) -> vector_integer_t\n" ""}, { "vinteger2d_t___setitem__", _wrap_vinteger2d_t___setitem__, METH_VARARGS, "\n" - "vinteger2d_t___setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice, vinteger2d_t v)\n" - "vinteger2d_t___setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vinteger2d_t___setitem__(vinteger2d_t self, PySliceObject * slice, vinteger2d_t v)\n" + "vinteger2d_t___setitem__(vinteger2d_t self, PySliceObject * slice)\n" "vinteger2d_t___setitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i, vector_integer_t x)\n" ""}, { "vinteger2d_t_pop", _wrap_vinteger2d_t_pop, METH_O, "vinteger2d_t_pop(vinteger2d_t self) -> vector_integer_t"}, @@ -28329,15 +29729,15 @@ static PyMethodDef SwigMethods[] = { { "vector_longinteger_t___delslice__", _wrap_vector_longinteger_t___delslice__, METH_VARARGS, "vector_longinteger_t___delslice__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i, std::vector< unsigned long >::difference_type j)"}, { "vector_longinteger_t___delitem__", _wrap_vector_longinteger_t___delitem__, METH_VARARGS, "\n" "vector_longinteger_t___delitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i)\n" - "vector_longinteger_t___delitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_longinteger_t___delitem__(vector_longinteger_t self, PySliceObject * slice)\n" ""}, { "vector_longinteger_t___getitem__", _wrap_vector_longinteger_t___getitem__, METH_VARARGS, "\n" - "vector_longinteger_t___getitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) -> vector_longinteger_t\n" + "vector_longinteger_t___getitem__(vector_longinteger_t self, PySliceObject * slice) -> vector_longinteger_t\n" "vector_longinteger_t___getitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i) -> std::vector< unsigned long >::value_type const &\n" ""}, { "vector_longinteger_t___setitem__", _wrap_vector_longinteger_t___setitem__, METH_VARARGS, "\n" - "vector_longinteger_t___setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice, vector_longinteger_t v)\n" - "vector_longinteger_t___setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_longinteger_t___setitem__(vector_longinteger_t self, PySliceObject * slice, vector_longinteger_t v)\n" + "vector_longinteger_t___setitem__(vector_longinteger_t self, PySliceObject * slice)\n" "vector_longinteger_t___setitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i, std::vector< unsigned long >::value_type const & x)\n" ""}, { "vector_longinteger_t_pop", _wrap_vector_longinteger_t_pop, METH_O, "vector_longinteger_t_pop(vector_longinteger_t self) -> std::vector< unsigned long >::value_type"}, @@ -28391,15 +29791,15 @@ static PyMethodDef SwigMethods[] = { { "vector_complex_t___delslice__", _wrap_vector_complex_t___delslice__, METH_VARARGS, "vector_complex_t___delslice__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i, std::vector< std::complex< double > >::difference_type j)"}, { "vector_complex_t___delitem__", _wrap_vector_complex_t___delitem__, METH_VARARGS, "\n" "vector_complex_t___delitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i)\n" - "vector_complex_t___delitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_complex_t___delitem__(vector_complex_t self, PySliceObject * slice)\n" ""}, { "vector_complex_t___getitem__", _wrap_vector_complex_t___getitem__, METH_VARARGS, "\n" - "vector_complex_t___getitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) -> vector_complex_t\n" + "vector_complex_t___getitem__(vector_complex_t self, PySliceObject * slice) -> vector_complex_t\n" "vector_complex_t___getitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i) -> std::vector< std::complex< double > >::value_type const &\n" ""}, { "vector_complex_t___setitem__", _wrap_vector_complex_t___setitem__, METH_VARARGS, "\n" - "vector_complex_t___setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice, vector_complex_t v)\n" - "vector_complex_t___setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_complex_t___setitem__(vector_complex_t self, PySliceObject * slice, vector_complex_t v)\n" + "vector_complex_t___setitem__(vector_complex_t self, PySliceObject * slice)\n" "vector_complex_t___setitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i, std::vector< std::complex< double > >::value_type const & x)\n" ""}, { "vector_complex_t_pop", _wrap_vector_complex_t_pop, METH_O, "vector_complex_t_pop(vector_complex_t self) -> std::vector< std::complex< double > >::value_type"}, @@ -28453,15 +29853,15 @@ static PyMethodDef SwigMethods[] = { { "vector_string_t___delslice__", _wrap_vector_string_t___delslice__, METH_VARARGS, "vector_string_t___delslice__(vector_string_t self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j)"}, { "vector_string_t___delitem__", _wrap_vector_string_t___delitem__, METH_VARARGS, "\n" "vector_string_t___delitem__(vector_string_t self, std::vector< std::string >::difference_type i)\n" - "vector_string_t___delitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_string_t___delitem__(vector_string_t self, PySliceObject * slice)\n" ""}, { "vector_string_t___getitem__", _wrap_vector_string_t___getitem__, METH_VARARGS, "\n" - "vector_string_t___getitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) -> vector_string_t\n" + "vector_string_t___getitem__(vector_string_t self, PySliceObject * slice) -> vector_string_t\n" "vector_string_t___getitem__(vector_string_t self, std::vector< std::string >::difference_type i) -> std::vector< std::string >::value_type const &\n" ""}, { "vector_string_t___setitem__", _wrap_vector_string_t___setitem__, METH_VARARGS, "\n" - "vector_string_t___setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice, vector_string_t v)\n" - "vector_string_t___setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_string_t___setitem__(vector_string_t self, PySliceObject * slice, vector_string_t v)\n" + "vector_string_t___setitem__(vector_string_t self, PySliceObject * slice)\n" "vector_string_t___setitem__(vector_string_t self, std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const & x)\n" ""}, { "vector_string_t_pop", _wrap_vector_string_t_pop, METH_O, "vector_string_t_pop(vector_string_t self) -> std::vector< std::string >::value_type"}, @@ -28571,15 +29971,15 @@ static PyMethodDef SwigMethods[] = { { "vector_pvacuum_double_t___delslice__", _wrap_vector_pvacuum_double_t___delslice__, METH_VARARGS, "vector_pvacuum_double_t___delslice__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i, std::vector< std::pair< double,double > >::difference_type j)"}, { "vector_pvacuum_double_t___delitem__", _wrap_vector_pvacuum_double_t___delitem__, METH_VARARGS, "\n" "vector_pvacuum_double_t___delitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i)\n" - "vector_pvacuum_double_t___delitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_pvacuum_double_t___delitem__(vector_pvacuum_double_t self, PySliceObject * slice)\n" ""}, { "vector_pvacuum_double_t___getitem__", _wrap_vector_pvacuum_double_t___getitem__, METH_VARARGS, "\n" - "vector_pvacuum_double_t___getitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) -> vector_pvacuum_double_t\n" + "vector_pvacuum_double_t___getitem__(vector_pvacuum_double_t self, PySliceObject * slice) -> vector_pvacuum_double_t\n" "vector_pvacuum_double_t___getitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i) -> pvacuum_double_t\n" ""}, { "vector_pvacuum_double_t___setitem__", _wrap_vector_pvacuum_double_t___setitem__, METH_VARARGS, "\n" - "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice, vector_pvacuum_double_t v)\n" - "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, PySliceObject * slice, vector_pvacuum_double_t v)\n" + "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, PySliceObject * slice)\n" "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i, pvacuum_double_t x)\n" ""}, { "vector_pvacuum_double_t_pop", _wrap_vector_pvacuum_double_t_pop, METH_O, "vector_pvacuum_double_t_pop(vector_pvacuum_double_t self) -> pvacuum_double_t"}, diff --git a/auto/Wrap/libBornAgainParam.py b/auto/Wrap/libBornAgainParam.py index f244406722f16f87b8e6b814f36e9a27a3bafbbe..a8eb8a1edb178ae88c24710cfad001873e39dcd6 100644 --- a/auto/Wrap/libBornAgainParam.py +++ b/auto/Wrap/libBornAgainParam.py @@ -195,21 +195,21 @@ class vdouble1d_t(object): def __delitem__(self, *args): r""" __delitem__(vdouble1d_t self, std::vector< double >::difference_type i) - __delitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vdouble1d_t self, PySliceObject * slice) """ return _libBornAgainParam.vdouble1d_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble1d_t + __getitem__(vdouble1d_t self, PySliceObject * slice) -> vdouble1d_t __getitem__(vdouble1d_t self, std::vector< double >::difference_type i) -> std::vector< double >::value_type const & """ return _libBornAgainParam.vdouble1d_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice, vdouble1d_t v) - __setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vdouble1d_t self, PySliceObject * slice, vdouble1d_t v) + __setitem__(vdouble1d_t self, PySliceObject * slice) __setitem__(vdouble1d_t self, std::vector< double >::difference_type i, std::vector< double >::value_type const & x) """ return _libBornAgainParam.vdouble1d_t___setitem__(self, *args) @@ -361,21 +361,21 @@ class vdouble2d_t(object): def __delitem__(self, *args): r""" __delitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i) - __delitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vdouble2d_t self, PySliceObject * slice) """ return _libBornAgainParam.vdouble2d_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble2d_t + __getitem__(vdouble2d_t self, PySliceObject * slice) -> vdouble2d_t __getitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i) -> vdouble1d_t """ return _libBornAgainParam.vdouble2d_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice, vdouble2d_t v) - __setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vdouble2d_t self, PySliceObject * slice, vdouble2d_t v) + __setitem__(vdouble2d_t self, PySliceObject * slice) __setitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i, vdouble1d_t x) """ return _libBornAgainParam.vdouble2d_t___setitem__(self, *args) @@ -527,21 +527,21 @@ class vector_integer_t(object): def __delitem__(self, *args): r""" __delitem__(vector_integer_t self, std::vector< int >::difference_type i) - __delitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_integer_t self, PySliceObject * slice) """ return _libBornAgainParam.vector_integer_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) -> vector_integer_t + __getitem__(vector_integer_t self, PySliceObject * slice) -> vector_integer_t __getitem__(vector_integer_t self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const & """ return _libBornAgainParam.vector_integer_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice, vector_integer_t v) - __setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_integer_t self, PySliceObject * slice, vector_integer_t v) + __setitem__(vector_integer_t self, PySliceObject * slice) __setitem__(vector_integer_t self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x) """ return _libBornAgainParam.vector_integer_t___setitem__(self, *args) @@ -693,21 +693,21 @@ class vinteger2d_t(object): def __delitem__(self, *args): r""" __delitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i) - __delitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vinteger2d_t self, PySliceObject * slice) """ return _libBornAgainParam.vinteger2d_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) -> vinteger2d_t + __getitem__(vinteger2d_t self, PySliceObject * slice) -> vinteger2d_t __getitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i) -> vector_integer_t """ return _libBornAgainParam.vinteger2d_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice, vinteger2d_t v) - __setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vinteger2d_t self, PySliceObject * slice, vinteger2d_t v) + __setitem__(vinteger2d_t self, PySliceObject * slice) __setitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i, vector_integer_t x) """ return _libBornAgainParam.vinteger2d_t___setitem__(self, *args) @@ -859,21 +859,21 @@ class vector_longinteger_t(object): def __delitem__(self, *args): r""" __delitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i) - __delitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_longinteger_t self, PySliceObject * slice) """ return _libBornAgainParam.vector_longinteger_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) -> vector_longinteger_t + __getitem__(vector_longinteger_t self, PySliceObject * slice) -> vector_longinteger_t __getitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i) -> std::vector< unsigned long >::value_type const & """ return _libBornAgainParam.vector_longinteger_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice, vector_longinteger_t v) - __setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_longinteger_t self, PySliceObject * slice, vector_longinteger_t v) + __setitem__(vector_longinteger_t self, PySliceObject * slice) __setitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i, std::vector< unsigned long >::value_type const & x) """ return _libBornAgainParam.vector_longinteger_t___setitem__(self, *args) @@ -1025,21 +1025,21 @@ class vector_complex_t(object): def __delitem__(self, *args): r""" __delitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i) - __delitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_complex_t self, PySliceObject * slice) """ return _libBornAgainParam.vector_complex_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) -> vector_complex_t + __getitem__(vector_complex_t self, PySliceObject * slice) -> vector_complex_t __getitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i) -> std::vector< std::complex< double > >::value_type const & """ return _libBornAgainParam.vector_complex_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice, vector_complex_t v) - __setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_complex_t self, PySliceObject * slice, vector_complex_t v) + __setitem__(vector_complex_t self, PySliceObject * slice) __setitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i, std::vector< std::complex< double > >::value_type const & x) """ return _libBornAgainParam.vector_complex_t___setitem__(self, *args) @@ -1191,21 +1191,21 @@ class vector_string_t(object): def __delitem__(self, *args): r""" __delitem__(vector_string_t self, std::vector< std::string >::difference_type i) - __delitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_string_t self, PySliceObject * slice) """ return _libBornAgainParam.vector_string_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) -> vector_string_t + __getitem__(vector_string_t self, PySliceObject * slice) -> vector_string_t __getitem__(vector_string_t self, std::vector< std::string >::difference_type i) -> std::vector< std::string >::value_type const & """ return _libBornAgainParam.vector_string_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice, vector_string_t v) - __setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_string_t self, PySliceObject * slice, vector_string_t v) + __setitem__(vector_string_t self, PySliceObject * slice) __setitem__(vector_string_t self, std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const & x) """ return _libBornAgainParam.vector_string_t___setitem__(self, *args) @@ -1540,21 +1540,21 @@ class vector_pvacuum_double_t(object): def __delitem__(self, *args): r""" __delitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i) - __delitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_pvacuum_double_t self, PySliceObject * slice) """ return _libBornAgainParam.vector_pvacuum_double_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) -> vector_pvacuum_double_t + __getitem__(vector_pvacuum_double_t self, PySliceObject * slice) -> vector_pvacuum_double_t __getitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i) -> pvacuum_double_t """ return _libBornAgainParam.vector_pvacuum_double_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice, vector_pvacuum_double_t v) - __setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_pvacuum_double_t self, PySliceObject * slice, vector_pvacuum_double_t v) + __setitem__(vector_pvacuum_double_t self, PySliceObject * slice) __setitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i, pvacuum_double_t x) """ return _libBornAgainParam.vector_pvacuum_double_t___setitem__(self, *args) @@ -1707,21 +1707,21 @@ class swig_dummy_type_const_inode_vector(object): def __delitem__(self, *args): r""" __delitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i) - __delitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice) + __delitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice) """ return _libBornAgainParam.swig_dummy_type_const_inode_vector___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice) -> swig_dummy_type_const_inode_vector + __getitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice) -> swig_dummy_type_const_inode_vector __getitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i) -> INode """ return _libBornAgainParam.swig_dummy_type_const_inode_vector___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice, swig_dummy_type_const_inode_vector v) - __setitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice) + __setitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice, swig_dummy_type_const_inode_vector v) + __setitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice) __setitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i, INode x) """ return _libBornAgainParam.swig_dummy_type_const_inode_vector___setitem__(self, *args) @@ -1873,21 +1873,21 @@ class vector_parsample_t(object): def __delitem__(self, *args): r""" __delitem__(vector_parsample_t self, std::vector< ParameterSample >::difference_type i) - __delitem__(vector_parsample_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_parsample_t self, PySliceObject * slice) """ return _libBornAgainParam.vector_parsample_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_parsample_t self, SWIGPY_SLICEOBJECT * slice) -> vector_parsample_t + __getitem__(vector_parsample_t self, PySliceObject * slice) -> vector_parsample_t __getitem__(vector_parsample_t self, std::vector< ParameterSample >::difference_type i) -> ParameterSample """ return _libBornAgainParam.vector_parsample_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_parsample_t self, SWIGPY_SLICEOBJECT * slice, vector_parsample_t v) - __setitem__(vector_parsample_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_parsample_t self, PySliceObject * slice, vector_parsample_t v) + __setitem__(vector_parsample_t self, PySliceObject * slice) __setitem__(vector_parsample_t self, std::vector< ParameterSample >::difference_type i, ParameterSample x) """ return _libBornAgainParam.vector_parsample_t___setitem__(self, *args) diff --git a/auto/Wrap/libBornAgainParam_wrap.cpp b/auto/Wrap/libBornAgainParam_wrap.cpp index e61c1967d2e7545bde38a0d3124f35a2ac135d27..c3eee2676c37321b051e40d05da59fce26418b10 100644 --- a/auto/Wrap/libBornAgainParam_wrap.cpp +++ b/auto/Wrap/libBornAgainParam_wrap.cpp @@ -3605,9 +3605,9 @@ namespace swig { #include <iostream> #if PY_VERSION_HEX >= 0x03020000 -# define SWIGPY_SLICEOBJECT PyObject +# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) #else -# define SWIGPY_SLICEOBJECT PySliceObject +# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) #endif @@ -5420,46 +5420,46 @@ SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *sel SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice,std::vector< double,std::allocator< double > > const &v){ +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5556,46 +5556,46 @@ SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delslice__(std::vec SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5693,46 +5693,46 @@ SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std: SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice,std::vector< int,std::allocator< int > > const &v){ +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5794,46 +5794,46 @@ SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delslice__(std::vector SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< int > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &v){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< int > > *self,PySliceObject *slice,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< int > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< int > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5915,46 +5915,46 @@ SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delslice__(std::vector< uns SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_0(std::vector< unsigned long > *self,std::vector< unsigned long >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< unsigned long,std::allocator< unsigned long > > *std_vector_Sl_unsigned_SS_long_Sg____getitem____SWIG_0(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< unsigned long,std::allocator< unsigned long > > *std_vector_Sl_unsigned_SS_long_Sg____getitem____SWIG_0(std::vector< unsigned long > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_0(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice,std::vector< unsigned long,std::allocator< unsigned long > > const &v){ +SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_0(std::vector< unsigned long > *self,PySliceObject *slice,std::vector< unsigned long,std::allocator< unsigned long > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_1(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_1(std::vector< unsigned long > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_1(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_1(std::vector< unsigned long > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5999,7 +5999,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_ (PyObject *o, std::complex<double>* val) SWIGINTERNINLINE PyObject* -SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/home/svechnikov/Projects/swig-4.1.0/installed/share/swig/4.1.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/ +SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/ const std::complex<double>& @@ -6067,46 +6067,46 @@ SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delslice__(std::ve SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::complex< double >,std::allocator< std::complex< double > > > *std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::complex< double >,std::allocator< std::complex< double > > > *std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::complex< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &v){ +SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::complex< double > > *self,PySliceObject *slice,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::complex< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::complex< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -6391,46 +6391,46 @@ SWIGINTERN void std_vector_Sl_std_string_Sg____delslice__(std::vector< std::stri SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::string,std::allocator< std::string > > const &v){ +SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice,std::vector< std::string,std::allocator< std::string > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -6920,46 +6920,46 @@ SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delslice__( SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_0(std::vector< std::pair< double,double > > *self,std::vector< std::pair< double,double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____getitem____SWIG_0(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____getitem____SWIG_0(std::vector< std::pair< double,double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_0(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &v){ +SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_0(std::vector< std::pair< double,double > > *self,PySliceObject *slice,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_1(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_1(std::vector< std::pair< double,double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_1(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_1(std::vector< std::pair< double,double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -7034,46 +7034,46 @@ SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____delslice__(std::vector< I SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_0(std::vector< INode const * > *self,std::vector< INode const * >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< INode const *,std::allocator< INode const * > > *std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(std::vector< INode const * > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< INode const *,std::allocator< INode const * > > *std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(std::vector< INode const * > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< INode const*,std::allocator< INode const * > >::difference_type id = i; std::vector< INode const*,std::allocator< INode const * > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(std::vector< INode const * > *self,SWIGPY_SLICEOBJECT *slice,std::vector< INode const *,std::allocator< INode const * > > const &v){ +SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(std::vector< INode const * > *self,PySliceObject *slice,std::vector< INode const *,std::allocator< INode const * > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< INode const*,std::allocator< INode const * > >::difference_type id = i; std::vector< INode const*,std::allocator< INode const * > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(std::vector< INode const * > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(std::vector< INode const * > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< INode const*,std::allocator< INode const * > >::difference_type id = i; std::vector< INode const*,std::allocator< INode const * > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(std::vector< INode const * > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(std::vector< INode const * > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< INode const*,std::allocator< INode const * > >::difference_type id = i; std::vector< INode const*,std::allocator< INode const * > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -7143,46 +7143,46 @@ SWIGINTERN void std_vector_Sl_ParameterSample_Sg____delslice__(std::vector< Para SWIGINTERN void std_vector_Sl_ParameterSample_Sg____delitem____SWIG_0(std::vector< ParameterSample > *self,std::vector< ParameterSample >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< ParameterSample,std::allocator< ParameterSample > > *std_vector_Sl_ParameterSample_Sg____getitem____SWIG_0(std::vector< ParameterSample > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< ParameterSample,std::allocator< ParameterSample > > *std_vector_Sl_ParameterSample_Sg____getitem____SWIG_0(std::vector< ParameterSample > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< ParameterSample,std::allocator< ParameterSample > >::difference_type id = i; std::vector< ParameterSample,std::allocator< ParameterSample > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_ParameterSample_Sg____setitem____SWIG_0(std::vector< ParameterSample > *self,SWIGPY_SLICEOBJECT *slice,std::vector< ParameterSample,std::allocator< ParameterSample > > const &v){ +SWIGINTERN void std_vector_Sl_ParameterSample_Sg____setitem____SWIG_0(std::vector< ParameterSample > *self,PySliceObject *slice,std::vector< ParameterSample,std::allocator< ParameterSample > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< ParameterSample,std::allocator< ParameterSample > >::difference_type id = i; std::vector< ParameterSample,std::allocator< ParameterSample > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_ParameterSample_Sg____setitem____SWIG_1(std::vector< ParameterSample > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_ParameterSample_Sg____setitem____SWIG_1(std::vector< ParameterSample > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< ParameterSample,std::allocator< ParameterSample > >::difference_type id = i; std::vector< ParameterSample,std::allocator< ParameterSample > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_ParameterSample_Sg____delitem____SWIG_1(std::vector< ParameterSample > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_ParameterSample_Sg____delitem____SWIG_1(std::vector< ParameterSample > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< ParameterSample,std::allocator< ParameterSample > >::difference_type id = i; std::vector< ParameterSample,std::allocator< ParameterSample > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -8550,7 +8550,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< double,std::allocator< double > > *result = 0 ; @@ -8563,9 +8563,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___getitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getitem____SWIG_0(arg1,arg2); @@ -8584,7 +8584,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< double,std::allocator< double > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -8598,9 +8598,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; @@ -8632,7 +8632,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -8644,9 +8644,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2); @@ -8665,7 +8665,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -8677,9 +8677,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___delitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_double_Sg____delitem____SWIG_1(arg1,arg2); @@ -8735,7 +8735,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble1d_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::__delitem__(std::vector< double >::difference_type)\n" - " std::vector< double >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< double >::__delitem__(PySliceObject *)\n"); return 0; } @@ -8813,7 +8813,7 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___getitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble1d_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< double >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< double >::__getitem__(PySliceObject *)\n" " std::vector< double >::__getitem__(std::vector< double >::difference_type) const\n"); return 0; } @@ -8923,8 +8923,8 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble1d_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< double >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< double,std::allocator< double > > const &)\n" - " std::vector< double >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< double >::__setitem__(PySliceObject *,std::vector< double,std::allocator< double > > const &)\n" + " std::vector< double >::__setitem__(PySliceObject *)\n" " std::vector< double >::__setitem__(std::vector< double >::difference_type,std::vector< double >::value_type const &)\n"); return 0; } @@ -9976,7 +9976,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble1d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble1d_t" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10374,7 +10384,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; @@ -10387,9 +10397,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___getitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -10408,7 +10418,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -10422,9 +10432,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; @@ -10456,7 +10466,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -10468,9 +10478,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -10489,7 +10499,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -10501,9 +10511,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___delitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -10559,7 +10569,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble2d_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::vector< double > >::__delitem__(std::vector< std::vector< double > >::difference_type)\n" - " std::vector< std::vector< double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::vector< double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -10637,7 +10647,7 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___getitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble2d_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< double > >::__getitem__(PySliceObject *)\n" " std::vector< std::vector< double > >::__getitem__(std::vector< std::vector< double > >::difference_type) const\n"); return 0; } @@ -10750,8 +10760,8 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble2d_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n" - " std::vector< std::vector< double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< double > >::__setitem__(PySliceObject *,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n" + " std::vector< std::vector< double > >::__setitem__(PySliceObject *)\n" " std::vector< std::vector< double > >::__setitem__(std::vector< std::vector< double > >::difference_type,std::vector< std::vector< double > >::value_type const &)\n"); return 0; } @@ -11830,7 +11840,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble2d_t" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -12228,7 +12248,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< int,std::allocator< int > > *result = 0 ; @@ -12241,9 +12261,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___getitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2); @@ -12262,7 +12282,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< int,std::allocator< int > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -12276,9 +12296,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; @@ -12310,7 +12330,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -12322,9 +12342,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2); @@ -12343,7 +12363,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -12355,9 +12375,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___delitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2); @@ -12413,7 +12433,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_integer_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n" - " std::vector< int >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< int >::__delitem__(PySliceObject *)\n"); return 0; } @@ -12491,7 +12511,7 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___getitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_integer_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< int >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< int >::__getitem__(PySliceObject *)\n" " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n"); return 0; } @@ -12601,8 +12621,8 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___setitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_integer_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< int >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< int,std::allocator< int > > const &)\n" - " std::vector< int >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n" + " std::vector< int >::__setitem__(PySliceObject *)\n" " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n"); return 0; } @@ -13654,7 +13674,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_integer_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_integer_t" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -14052,7 +14082,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *result = 0 ; @@ -14065,9 +14095,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___getitem____SWIG_0(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *)std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -14086,7 +14116,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -14100,9 +14130,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_0(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *ptr = (std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *)0; @@ -14134,7 +14164,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -14146,9 +14176,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_1(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -14167,7 +14197,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -14179,9 +14209,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___delitem____SWIG_1(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -14237,7 +14267,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vinteger2d_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::vector< int > >::__delitem__(std::vector< std::vector< int > >::difference_type)\n" - " std::vector< std::vector< int > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::vector< int > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -14315,7 +14345,7 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___getitem__(PyObject *self, PyObject *ar fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vinteger2d_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< int > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< int > >::__getitem__(PySliceObject *)\n" " std::vector< std::vector< int > >::__getitem__(std::vector< std::vector< int > >::difference_type) const\n"); return 0; } @@ -14428,8 +14458,8 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem__(PyObject *self, PyObject *ar fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vinteger2d_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< int > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &)\n" - " std::vector< std::vector< int > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< int > >::__setitem__(PySliceObject *,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &)\n" + " std::vector< std::vector< int > >::__setitem__(PySliceObject *)\n" " std::vector< std::vector< int > >::__setitem__(std::vector< std::vector< int > >::difference_type,std::vector< std::vector< int > >::value_type const &)\n"); return 0; } @@ -15508,7 +15538,17 @@ SWIGINTERN PyObject *_wrap_delete_vinteger2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vinteger2d_t" "', argument " "1"" of type '" "std::vector< std::vector< int > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -15906,7 +15946,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< unsigned long,std::allocator< unsigned long > > *result = 0 ; @@ -15919,9 +15959,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___getitem____SWIG_0(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< unsigned long,std::allocator< unsigned long > > *)std_vector_Sl_unsigned_SS_long_Sg____getitem____SWIG_0(arg1,arg2); @@ -15940,7 +15980,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< unsigned long,std::allocator< unsigned long > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -15954,9 +15994,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_0(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< unsigned long,std::allocator< unsigned long > > *ptr = (std::vector< unsigned long,std::allocator< unsigned long > > *)0; @@ -15988,7 +16028,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -16000,9 +16040,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_1(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_1(arg1,arg2); @@ -16021,7 +16061,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -16033,9 +16073,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___delitem____SWIG_1(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_1(arg1,arg2); @@ -16091,7 +16131,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_longinteger_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< unsigned long >::__delitem__(std::vector< unsigned long >::difference_type)\n" - " std::vector< unsigned long >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< unsigned long >::__delitem__(PySliceObject *)\n"); return 0; } @@ -16169,7 +16209,7 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___getitem__(PyObject *self, PyOb fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_longinteger_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< unsigned long >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< unsigned long >::__getitem__(PySliceObject *)\n" " std::vector< unsigned long >::__getitem__(std::vector< unsigned long >::difference_type) const\n"); return 0; } @@ -16279,8 +16319,8 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem__(PyObject *self, PyOb fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_longinteger_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< unsigned long >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< unsigned long,std::allocator< unsigned long > > const &)\n" - " std::vector< unsigned long >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< unsigned long >::__setitem__(PySliceObject *,std::vector< unsigned long,std::allocator< unsigned long > > const &)\n" + " std::vector< unsigned long >::__setitem__(PySliceObject *)\n" " std::vector< unsigned long >::__setitem__(std::vector< unsigned long >::difference_type,std::vector< unsigned long >::value_type const &)\n"); return 0; } @@ -17332,7 +17372,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_longinteger_t(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_longinteger_t" "', argument " "1"" of type '" "std::vector< unsigned long > *""'"); } arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -17730,7 +17780,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::complex< double >,std::allocator< std::complex< double > > > *result = 0 ; @@ -17743,9 +17793,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___getitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -17764,7 +17814,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::complex< double >,std::allocator< std::complex< double > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -17778,9 +17828,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::complex< double >,std::allocator< std::complex< double > > > *ptr = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)0; @@ -17812,7 +17862,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -17824,9 +17874,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -17845,7 +17895,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -17857,9 +17907,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___delitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -17915,7 +17965,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_complex_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::complex< double > >::__delitem__(std::vector< std::complex< double > >::difference_type)\n" - " std::vector< std::complex< double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::complex< double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -17993,7 +18043,7 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___getitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_complex_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::complex< double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::complex< double > >::__getitem__(PySliceObject *)\n" " std::vector< std::complex< double > >::__getitem__(std::vector< std::complex< double > >::difference_type) const\n"); return 0; } @@ -18103,8 +18153,8 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___setitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_complex_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::complex< double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)\n" - " std::vector< std::complex< double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::complex< double > >::__setitem__(PySliceObject *,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)\n" + " std::vector< std::complex< double > >::__setitem__(PySliceObject *)\n" " std::vector< std::complex< double > >::__setitem__(std::vector< std::complex< double > >::difference_type,std::vector< std::complex< double > >::value_type const &)\n"); return 0; } @@ -19156,7 +19206,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_complex_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_complex_t" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -19554,7 +19614,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::string,std::allocator< std::string > > *result = 0 ; @@ -19567,9 +19627,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___getitem____SWIG_0(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg____getitem____SWIG_0(arg1,arg2); @@ -19588,7 +19648,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::string,std::allocator< std::string > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -19602,9 +19662,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_0(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; @@ -19636,7 +19696,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -19648,9 +19708,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_1(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_string_Sg____setitem____SWIG_1(arg1,arg2); @@ -19669,7 +19729,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -19681,9 +19741,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___delitem____SWIG_1(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_string_Sg____delitem____SWIG_1(arg1,arg2); @@ -19739,7 +19799,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_string_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::string >::__delitem__(std::vector< std::string >::difference_type)\n" - " std::vector< std::string >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::string >::__delitem__(PySliceObject *)\n"); return 0; } @@ -19817,7 +19877,7 @@ SWIGINTERN PyObject *_wrap_vector_string_t___getitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_string_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::string >::__getitem__(PySliceObject *)\n" " std::vector< std::string >::__getitem__(std::vector< std::string >::difference_type) const\n"); return 0; } @@ -19930,8 +19990,8 @@ SWIGINTERN PyObject *_wrap_vector_string_t___setitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_string_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::string,std::allocator< std::string > > const &)\n" - " std::vector< std::string >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::string >::__setitem__(PySliceObject *,std::vector< std::string,std::allocator< std::string > > const &)\n" + " std::vector< std::string >::__setitem__(PySliceObject *)\n" " std::vector< std::string >::__setitem__(std::vector< std::string >::difference_type,std::vector< std::string >::value_type const &)\n"); return 0; } @@ -21010,7 +21070,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_string_t(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_string_t" "', argument " "1"" of type '" "std::vector< std::string > *""'"); } arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22219,7 +22289,17 @@ SWIGINTERN PyObject *_wrap_delete_map_string_double_t(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_string_double_t" "', argument " "1"" of type '" "std::map< std::string,double > *""'"); } arg1 = reinterpret_cast< std::map< std::string,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22472,7 +22552,17 @@ SWIGINTERN PyObject *_wrap_delete_pvacuum_double_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pvacuum_double_t" "', argument " "1"" of type '" "std::pair< double,double > *""'"); } arg1 = reinterpret_cast< std::pair< double,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22870,7 +22960,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *result = 0 ; @@ -22883,9 +22973,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___getitem____SWIG_0(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *)std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -22904,7 +22994,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -22918,9 +23008,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_0(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *ptr = (std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *)0; @@ -22952,7 +23042,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -22964,9 +23054,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_1(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -22985,7 +23075,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -22997,9 +23087,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___delitem____SWIG_1(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -23055,7 +23145,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_pvacuum_double_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::pair< double,double > >::__delitem__(std::vector< std::pair< double,double > >::difference_type)\n" - " std::vector< std::pair< double,double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::pair< double,double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -23133,7 +23223,7 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___getitem__(PyObject *self, P fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_pvacuum_double_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< double,double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::pair< double,double > >::__getitem__(PySliceObject *)\n" " std::vector< std::pair< double,double > >::__getitem__(std::vector< std::pair< double,double > >::difference_type) const\n"); return 0; } @@ -23246,8 +23336,8 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem__(PyObject *self, P fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_pvacuum_double_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< double,double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &)\n" - " std::vector< std::pair< double,double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::pair< double,double > >::__setitem__(PySliceObject *,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &)\n" + " std::vector< std::pair< double,double > >::__setitem__(PySliceObject *)\n" " std::vector< std::pair< double,double > >::__setitem__(std::vector< std::pair< double,double > >::difference_type,std::vector< std::pair< double,double > >::value_type const &)\n"); return 0; } @@ -24326,7 +24416,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_pvacuum_double_t(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_pvacuum_double_t" "', argument " "1"" of type '" "std::vector< std::pair< double,double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24362,7 +24462,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_iterator(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_iterator" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_INode_SS_const_Sm__Sg__iterator(arg1,arg2); + { + try { + result = (swig::SwigPyIterator *)std_vector_Sl_INode_SS_const_Sm__Sg__iterator(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24385,7 +24495,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___nonzero__(PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector___nonzero__" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____nonzero__((std::vector< INode const * > const *)arg1); + { + try { + result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____nonzero__((std::vector< INode const * > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24408,7 +24528,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___bool__(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector___bool__" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____bool__((std::vector< INode const * > const *)arg1); + { + try { + result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____bool__((std::vector< INode const * > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24431,7 +24561,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___len__(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector___len__" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = std_vector_Sl_INode_SS_const_Sm__Sg____len__((std::vector< INode const * > const *)arg1); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg____len__((std::vector< INode const * > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -24469,12 +24609,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getslice__(PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "swig_dummy_type_const_inode_vector___getslice__" "', argument " "3"" of type '" "std::vector< INode const * >::difference_type""'"); } arg3 = static_cast< std::vector< INode const * >::difference_type >(val3); - try { - result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -24511,12 +24661,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setslice____SWIG SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "swig_dummy_type_const_inode_vector___setslice__" "', argument " "3"" of type '" "std::vector< INode const * >::difference_type""'"); } arg3 = static_cast< std::vector< INode const * >::difference_type >(val3); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -24566,12 +24726,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setslice____SWIG } arg4 = ptr; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< INode const *,std::allocator< INode const * > > const &)*arg4); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< INode const *,std::allocator< INode const * > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; @@ -24673,12 +24843,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delslice__(PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "swig_dummy_type_const_inode_vector___delslice__" "', argument " "3"" of type '" "std::vector< INode const * >::difference_type""'"); } arg3 = static_cast< std::vector< INode const * >::difference_type >(val3); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -24707,12 +24887,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delitem____SWIG_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector___delitem__" "', argument " "2"" of type '" "std::vector< INode const * >::difference_type""'"); } arg2 = static_cast< std::vector< INode const * >::difference_type >(val2); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -24724,7 +24914,7 @@ fail: SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< INode const * > *arg1 = (std::vector< INode const * > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< INode const *,std::allocator< INode const * > > *result = 0 ; @@ -24737,16 +24927,26 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem____SWIG_ arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -24758,7 +24958,7 @@ fail: SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< INode const * > *arg1 = (std::vector< INode const * > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< INode const *,std::allocator< INode const * > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -24772,9 +24972,9 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< INode const*,std::allocator< INode const * > > *ptr = (std::vector< INode const*,std::allocator< INode const * > > *)0; @@ -24787,12 +24987,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ } arg3 = ptr; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< INode const *,std::allocator< INode const * > > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< INode const *,std::allocator< INode const * > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; @@ -24806,7 +25016,7 @@ fail: SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< INode const * > *arg1 = (std::vector< INode const * > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -24818,16 +25028,26 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -24839,7 +25059,7 @@ fail: SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< INode const * > *arg1 = (std::vector< INode const * > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -24851,16 +25071,26 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delitem____SWIG_ arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -24909,7 +25139,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'swig_dummy_type_const_inode_vector___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< INode const * >::__delitem__(std::vector< INode const * >::difference_type)\n" - " std::vector< INode const * >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< INode const * >::__delitem__(PySliceObject *)\n"); return 0; } @@ -24935,10 +25165,20 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem____SWIG_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector___getitem__" "', argument " "2"" of type '" "std::vector< INode const * >::difference_type""'"); } arg2 = static_cast< std::vector< INode const * >::difference_type >(val2); - try { - result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_1(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_1(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; @@ -24986,7 +25226,7 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem__(PyObje fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'swig_dummy_type_const_inode_vector___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< INode const * >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< INode const * >::__getitem__(PySliceObject *)\n" " std::vector< INode const * >::__getitem__(std::vector< INode const * >::difference_type)\n"); return 0; } @@ -25020,10 +25260,20 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -25093,8 +25343,8 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem__(PyObje fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'swig_dummy_type_const_inode_vector___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< INode const * >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< INode const *,std::allocator< INode const * > > const &)\n" - " std::vector< INode const * >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< INode const * >::__setitem__(PySliceObject *,std::vector< INode const *,std::allocator< INode const * > > const &)\n" + " std::vector< INode const * >::__setitem__(PySliceObject *)\n" " std::vector< INode const * >::__setitem__(std::vector< INode const * >::difference_type,std::vector< INode const * >::value_type)\n"); return 0; } @@ -25115,10 +25365,20 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_pop(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_pop" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - try { - result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; @@ -25148,7 +25408,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_append(PyObject *s SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "swig_dummy_type_const_inode_vector_append" "', argument " "2"" of type '" "std::vector< INode const * >::value_type""'"); } arg2 = reinterpret_cast< std::vector< INode const * >::value_type >(argp2); - std_vector_Sl_INode_SS_const_Sm__Sg__append(arg1,(INode const *)arg2); + { + try { + std_vector_Sl_INode_SS_const_Sm__Sg__append(arg1,(INode const *)arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25161,7 +25431,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_0(PyObje std::vector< INode const * > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< INode const * > *)new std::vector< INode const * >(); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25187,7 +25467,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_1(PyObje } arg1 = ptr; } - result = (std::vector< INode const * > *)new std::vector< INode const * >((std::vector< INode const * > const &)*arg1); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >((std::vector< INode const * > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -25212,7 +25502,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_empty(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_empty" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (bool)((std::vector< INode const * > const *)arg1)->empty(); + { + try { + result = (bool)((std::vector< INode const * > const *)arg1)->empty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25235,7 +25535,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_size(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_size" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = ((std::vector< INode const * > const *)arg1)->size(); + { + try { + result = ((std::vector< INode const * > const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -25267,7 +25577,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_swap(PyObject *sel SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "swig_dummy_type_const_inode_vector_swap" "', argument " "2"" of type '" "std::vector< INode const * > &""'"); } arg2 = reinterpret_cast< std::vector< INode const * > * >(argp2); - (arg1)->swap(*arg2); + { + try { + (arg1)->swap(*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25290,7 +25610,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_begin(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_begin" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->begin(); + { + try { + result = (arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -25314,7 +25644,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_end(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_end" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->end(); + { + try { + result = (arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -25338,7 +25678,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_rbegin(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_rbegin" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->rbegin(); + { + try { + result = (arg1)->rbegin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -25362,7 +25712,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_rend(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_rend" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->rend(); + { + try { + result = (arg1)->rend(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -25385,7 +25745,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_clear(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_clear" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - (arg1)->clear(); + { + try { + (arg1)->clear(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25408,7 +25778,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_get_allocator(PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_get_allocator" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = ((std::vector< INode const * > const *)arg1)->get_allocator(); + { + try { + result = ((std::vector< INode const * > const *)arg1)->get_allocator(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< INode const * >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_INode_const_p_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25429,7 +25809,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_2(PyObje SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_swig_dummy_type_const_inode_vector" "', argument " "1"" of type '" "std::vector< INode const * >::size_type""'"); } arg1 = static_cast< std::vector< INode const * >::size_type >(val1); - result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25451,7 +25841,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_pop_back(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_pop_back" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - (arg1)->pop_back(); + { + try { + (arg1)->pop_back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25479,7 +25879,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_resize__SWIG_0(PyO SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector_resize" "', argument " "2"" of type '" "std::vector< INode const * >::size_type""'"); } arg2 = static_cast< std::vector< INode const * >::size_type >(val2); - (arg1)->resize(arg2); + { + try { + (arg1)->resize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25514,7 +25924,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_erase__SWIG_0(PyOb SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector_erase" "', argument " "2"" of type '" "std::vector< INode const * >::iterator""'"); } } - result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -25564,7 +25984,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_erase__SWIG_1(PyOb SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector_erase" "', argument " "3"" of type '" "std::vector< INode const * >::iterator""'"); } } - result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -25643,7 +26073,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_3(PyObje SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_swig_dummy_type_const_inode_vector" "', argument " "2"" of type '" "std::vector< INode const * >::value_type""'"); } arg2 = reinterpret_cast< std::vector< INode const * >::value_type >(argp2); - result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1,arg2); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25728,7 +26168,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_push_back(PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "swig_dummy_type_const_inode_vector_push_back" "', argument " "2"" of type '" "std::vector< INode const * >::value_type""'"); } arg2 = reinterpret_cast< std::vector< INode const * >::value_type >(argp2); - (arg1)->push_back(arg2); + { + try { + (arg1)->push_back(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25751,7 +26201,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_front(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_front" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->front(); + { + try { + result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->front(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; fail: @@ -25774,7 +26234,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_back(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_back" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->back(); + { + try { + result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; fail: @@ -25811,7 +26281,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_assign(PyObject *s SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector_assign" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - (arg1)->assign(arg2,arg3); + { + try { + (arg1)->assign(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25847,7 +26327,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_resize__SWIG_1(PyO SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector_resize" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - (arg1)->resize(arg2,arg3); + { + try { + (arg1)->resize(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25941,7 +26431,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_insert__SWIG_0(PyO SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector_insert" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - result = std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -25992,7 +26492,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_insert__SWIG_1(PyO SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "swig_dummy_type_const_inode_vector_insert" "', argument " "4"" of type '" "std::vector< INode const * >::value_type""'"); } arg4 = reinterpret_cast< std::vector< INode const * >::value_type >(argp4); - std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(INode const *)arg4); + { + try { + std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(INode const *)arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26081,7 +26591,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_reserve(PyObject * SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector_reserve" "', argument " "2"" of type '" "std::vector< INode const * >::size_type""'"); } arg2 = static_cast< std::vector< INode const * >::size_type >(val2); - (arg1)->reserve(arg2); + { + try { + (arg1)->reserve(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26104,7 +26624,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_capacity(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_capacity" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = ((std::vector< INode const * > const *)arg1)->capacity(); + { + try { + result = ((std::vector< INode const * > const *)arg1)->capacity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26126,7 +26656,17 @@ SWIGINTERN PyObject *_wrap_delete_swig_dummy_type_const_inode_vector(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_swig_dummy_type_const_inode_vector" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26162,7 +26702,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_iterator(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_iterator" "', argument " "1"" of type '" "std::vector< ParameterSample > *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_ParameterSample_Sg__iterator(arg1,arg2); + { + try { + result = (swig::SwigPyIterator *)std_vector_Sl_ParameterSample_Sg__iterator(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26185,7 +26735,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___nonzero__(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t___nonzero__" "', argument " "1"" of type '" "std::vector< ParameterSample > const *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (bool)std_vector_Sl_ParameterSample_Sg____nonzero__((std::vector< ParameterSample > const *)arg1); + { + try { + result = (bool)std_vector_Sl_ParameterSample_Sg____nonzero__((std::vector< ParameterSample > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26208,9 +26768,19 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___bool__(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t___bool__" "', argument " "1"" of type '" "std::vector< ParameterSample > const *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (bool)std_vector_Sl_ParameterSample_Sg____bool__((std::vector< ParameterSample > const *)arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; + { + try { + result = (bool)std_vector_Sl_ParameterSample_Sg____bool__((std::vector< ParameterSample > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; fail: return NULL; } @@ -26231,7 +26801,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___len__(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t___len__" "', argument " "1"" of type '" "std::vector< ParameterSample > const *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = std_vector_Sl_ParameterSample_Sg____len__((std::vector< ParameterSample > const *)arg1); + { + try { + result = std_vector_Sl_ParameterSample_Sg____len__((std::vector< ParameterSample > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26269,12 +26849,22 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___getslice__(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_parsample_t___getslice__" "', argument " "3"" of type '" "std::vector< ParameterSample >::difference_type""'"); } arg3 = static_cast< std::vector< ParameterSample >::difference_type >(val3); - try { - result = (std::vector< ParameterSample,std::allocator< ParameterSample > > *)std_vector_Sl_ParameterSample_Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< ParameterSample,std::allocator< ParameterSample > > *)std_vector_Sl_ParameterSample_Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ParameterSample_std__allocatorT_ParameterSample_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26311,12 +26901,22 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___setslice____SWIG_0(PyObject *sel SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_parsample_t___setslice__" "', argument " "3"" of type '" "std::vector< ParameterSample >::difference_type""'"); } arg3 = static_cast< std::vector< ParameterSample >::difference_type >(val3); - try { - std_vector_Sl_ParameterSample_Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_ParameterSample_Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26366,12 +26966,22 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___setslice____SWIG_1(PyObject *sel } arg4 = ptr; } - try { - std_vector_Sl_ParameterSample_Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< ParameterSample,std::allocator< ParameterSample > > const &)*arg4); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_ParameterSample_Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< ParameterSample,std::allocator< ParameterSample > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; @@ -26473,12 +27083,22 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___delslice__(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_parsample_t___delslice__" "', argument " "3"" of type '" "std::vector< ParameterSample >::difference_type""'"); } arg3 = static_cast< std::vector< ParameterSample >::difference_type >(val3); - try { - std_vector_Sl_ParameterSample_Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_ParameterSample_Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26507,12 +27127,22 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___delitem____SWIG_0(PyObject *self SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_parsample_t___delitem__" "', argument " "2"" of type '" "std::vector< ParameterSample >::difference_type""'"); } arg2 = static_cast< std::vector< ParameterSample >::difference_type >(val2); - try { - std_vector_Sl_ParameterSample_Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_ParameterSample_Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26524,7 +27154,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_parsample_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< ParameterSample > *arg1 = (std::vector< ParameterSample > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< ParameterSample,std::allocator< ParameterSample > > *result = 0 ; @@ -26537,16 +27167,26 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___getitem____SWIG_0(PyObject *self arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - result = (std::vector< ParameterSample,std::allocator< ParameterSample > > *)std_vector_Sl_ParameterSample_Sg____getitem____SWIG_0(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< ParameterSample,std::allocator< ParameterSample > > *)std_vector_Sl_ParameterSample_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ParameterSample_std__allocatorT_ParameterSample_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26558,7 +27198,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_parsample_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< ParameterSample > *arg1 = (std::vector< ParameterSample > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< ParameterSample,std::allocator< ParameterSample > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -26572,9 +27212,9 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___setitem____SWIG_0(PyObject *self arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< ParameterSample,std::allocator< ParameterSample > > *ptr = (std::vector< ParameterSample,std::allocator< ParameterSample > > *)0; @@ -26587,12 +27227,22 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___setitem____SWIG_0(PyObject *self } arg3 = ptr; } - try { - std_vector_Sl_ParameterSample_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< ParameterSample,std::allocator< ParameterSample > > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_ParameterSample_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< ParameterSample,std::allocator< ParameterSample > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; @@ -26606,7 +27256,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_parsample_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< ParameterSample > *arg1 = (std::vector< ParameterSample > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -26618,16 +27268,26 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___setitem____SWIG_1(PyObject *self arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_ParameterSample_Sg____setitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_ParameterSample_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26639,7 +27299,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_parsample_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< ParameterSample > *arg1 = (std::vector< ParameterSample > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -26651,16 +27311,26 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___delitem____SWIG_1(PyObject *self arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_ParameterSample_Sg____delitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_ParameterSample_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26709,7 +27379,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_parsample_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< ParameterSample >::__delitem__(std::vector< ParameterSample >::difference_type)\n" - " std::vector< ParameterSample >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< ParameterSample >::__delitem__(PySliceObject *)\n"); return 0; } @@ -26735,10 +27405,20 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___getitem____SWIG_1(PyObject *self SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_parsample_t___getitem__" "', argument " "2"" of type '" "std::vector< ParameterSample >::difference_type""'"); } arg2 = static_cast< std::vector< ParameterSample >::difference_type >(val2); - try { - result = (std::vector< ParameterSample >::value_type *) &std_vector_Sl_ParameterSample_Sg____getitem____SWIG_1((std::vector< ParameterSample > const *)arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< ParameterSample >::value_type *) &std_vector_Sl_ParameterSample_Sg____getitem____SWIG_1((std::vector< ParameterSample > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParameterSample, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< ParameterSample >::value_type>::category>::back_reference(resultobj, swig_obj[0]); @@ -26787,7 +27467,7 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___getitem__(PyObject *self, PyObje fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_parsample_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< ParameterSample >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< ParameterSample >::__getitem__(PySliceObject *)\n" " std::vector< ParameterSample >::__getitem__(std::vector< ParameterSample >::difference_type) const\n"); return 0; } @@ -26824,10 +27504,20 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___setitem____SWIG_2(PyObject *self SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_parsample_t___setitem__" "', argument " "3"" of type '" "std::vector< ParameterSample >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< ParameterSample >::value_type * >(argp3); - try { - std_vector_Sl_ParameterSample_Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(ParameterSample const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + std_vector_Sl_ParameterSample_Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(ParameterSample const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26896,8 +27586,8 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t___setitem__(PyObject *self, PyObje fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_parsample_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< ParameterSample >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< ParameterSample,std::allocator< ParameterSample > > const &)\n" - " std::vector< ParameterSample >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< ParameterSample >::__setitem__(PySliceObject *,std::vector< ParameterSample,std::allocator< ParameterSample > > const &)\n" + " std::vector< ParameterSample >::__setitem__(PySliceObject *)\n" " std::vector< ParameterSample >::__setitem__(std::vector< ParameterSample >::difference_type,std::vector< ParameterSample >::value_type const &)\n"); return 0; } @@ -26918,10 +27608,20 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_pop(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_pop" "', argument " "1"" of type '" "std::vector< ParameterSample > *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - try { - result = std_vector_Sl_ParameterSample_Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = std_vector_Sl_ParameterSample_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj((new std::vector< ParameterSample >::value_type(result)), SWIGTYPE_p_ParameterSample, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26954,7 +27654,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_append(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_parsample_t_append" "', argument " "2"" of type '" "std::vector< ParameterSample >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< ParameterSample >::value_type * >(argp2); - std_vector_Sl_ParameterSample_Sg__append(arg1,(ParameterSample const &)*arg2); + { + try { + std_vector_Sl_ParameterSample_Sg__append(arg1,(ParameterSample const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26967,7 +27677,17 @@ SWIGINTERN PyObject *_wrap_new_vector_parsample_t__SWIG_0(PyObject *self, Py_ssi std::vector< ParameterSample > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< ParameterSample > *)new std::vector< ParameterSample >(); + { + try { + result = (std::vector< ParameterSample > *)new std::vector< ParameterSample >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ParameterSample_std__allocatorT_ParameterSample_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26993,7 +27713,17 @@ SWIGINTERN PyObject *_wrap_new_vector_parsample_t__SWIG_1(PyObject *self, Py_ssi } arg1 = ptr; } - result = (std::vector< ParameterSample > *)new std::vector< ParameterSample >((std::vector< ParameterSample > const &)*arg1); + { + try { + result = (std::vector< ParameterSample > *)new std::vector< ParameterSample >((std::vector< ParameterSample > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ParameterSample_std__allocatorT_ParameterSample_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -27018,7 +27748,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_empty(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_empty" "', argument " "1"" of type '" "std::vector< ParameterSample > const *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (bool)((std::vector< ParameterSample > const *)arg1)->empty(); + { + try { + result = (bool)((std::vector< ParameterSample > const *)arg1)->empty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -27041,7 +27781,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_size(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_size" "', argument " "1"" of type '" "std::vector< ParameterSample > const *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = ((std::vector< ParameterSample > const *)arg1)->size(); + { + try { + result = ((std::vector< ParameterSample > const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -27073,7 +27823,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_swap(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_parsample_t_swap" "', argument " "2"" of type '" "std::vector< ParameterSample > &""'"); } arg2 = reinterpret_cast< std::vector< ParameterSample > * >(argp2); - (arg1)->swap(*arg2); + { + try { + (arg1)->swap(*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27096,7 +27856,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_begin(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_begin" "', argument " "1"" of type '" "std::vector< ParameterSample > *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (arg1)->begin(); + { + try { + result = (arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ParameterSample >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27120,7 +27890,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_end(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_end" "', argument " "1"" of type '" "std::vector< ParameterSample > *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (arg1)->end(); + { + try { + result = (arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ParameterSample >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27144,7 +27924,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_rbegin(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_rbegin" "', argument " "1"" of type '" "std::vector< ParameterSample > *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (arg1)->rbegin(); + { + try { + result = (arg1)->rbegin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ParameterSample >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27168,7 +27958,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_rend(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_rend" "', argument " "1"" of type '" "std::vector< ParameterSample > *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (arg1)->rend(); + { + try { + result = (arg1)->rend(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ParameterSample >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27191,7 +27991,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_clear(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_clear" "', argument " "1"" of type '" "std::vector< ParameterSample > *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - (arg1)->clear(); + { + try { + (arg1)->clear(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27214,7 +28024,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_get_allocator(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_get_allocator" "', argument " "1"" of type '" "std::vector< ParameterSample > const *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = ((std::vector< ParameterSample > const *)arg1)->get_allocator(); + { + try { + result = ((std::vector< ParameterSample > const *)arg1)->get_allocator(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParameterSample >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_ParameterSample_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27235,7 +28055,17 @@ SWIGINTERN PyObject *_wrap_new_vector_parsample_t__SWIG_2(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_parsample_t" "', argument " "1"" of type '" "std::vector< ParameterSample >::size_type""'"); } arg1 = static_cast< std::vector< ParameterSample >::size_type >(val1); - result = (std::vector< ParameterSample > *)new std::vector< ParameterSample >(arg1); + { + try { + result = (std::vector< ParameterSample > *)new std::vector< ParameterSample >(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ParameterSample_std__allocatorT_ParameterSample_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27257,7 +28087,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_pop_back(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_pop_back" "', argument " "1"" of type '" "std::vector< ParameterSample > *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - (arg1)->pop_back(); + { + try { + (arg1)->pop_back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27285,7 +28125,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_resize__SWIG_0(PyObject *self, Py_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_parsample_t_resize" "', argument " "2"" of type '" "std::vector< ParameterSample >::size_type""'"); } arg2 = static_cast< std::vector< ParameterSample >::size_type >(val2); - (arg1)->resize(arg2); + { + try { + (arg1)->resize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27320,7 +28170,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_erase__SWIG_0(PyObject *self, Py_s SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t_erase" "', argument " "2"" of type '" "std::vector< ParameterSample >::iterator""'"); } } - result = std_vector_Sl_ParameterSample_Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = std_vector_Sl_ParameterSample_Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ParameterSample >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27370,7 +28230,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_erase__SWIG_1(PyObject *self, Py_s SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_parsample_t_erase" "', argument " "3"" of type '" "std::vector< ParameterSample >::iterator""'"); } } - result = std_vector_Sl_ParameterSample_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + { + try { + result = std_vector_Sl_ParameterSample_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ParameterSample >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27452,7 +28322,17 @@ SWIGINTERN PyObject *_wrap_new_vector_parsample_t__SWIG_3(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vector_parsample_t" "', argument " "2"" of type '" "std::vector< ParameterSample >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< ParameterSample >::value_type * >(argp2); - result = (std::vector< ParameterSample > *)new std::vector< ParameterSample >(arg1,(std::vector< ParameterSample >::value_type const &)*arg2); + { + try { + result = (std::vector< ParameterSample > *)new std::vector< ParameterSample >(arg1,(std::vector< ParameterSample >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ParameterSample_std__allocatorT_ParameterSample_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27539,7 +28419,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_push_back(PyObject *self, PyObject SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_parsample_t_push_back" "', argument " "2"" of type '" "std::vector< ParameterSample >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< ParameterSample >::value_type * >(argp2); - (arg1)->push_back((std::vector< ParameterSample >::value_type const &)*arg2); + { + try { + (arg1)->push_back((std::vector< ParameterSample >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27562,7 +28452,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_front(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_front" "', argument " "1"" of type '" "std::vector< ParameterSample > const *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (std::vector< ParameterSample >::value_type *) &((std::vector< ParameterSample > const *)arg1)->front(); + { + try { + result = (std::vector< ParameterSample >::value_type *) &((std::vector< ParameterSample > const *)arg1)->front(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParameterSample, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< ParameterSample >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -27586,7 +28486,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_back(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_back" "', argument " "1"" of type '" "std::vector< ParameterSample > const *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = (std::vector< ParameterSample >::value_type *) &((std::vector< ParameterSample > const *)arg1)->back(); + { + try { + result = (std::vector< ParameterSample >::value_type *) &((std::vector< ParameterSample > const *)arg1)->back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParameterSample, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< ParameterSample >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -27627,7 +28537,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_assign(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_parsample_t_assign" "', argument " "3"" of type '" "std::vector< ParameterSample >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< ParameterSample >::value_type * >(argp3); - (arg1)->assign(arg2,(std::vector< ParameterSample >::value_type const &)*arg3); + { + try { + (arg1)->assign(arg2,(std::vector< ParameterSample >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27666,7 +28586,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_resize__SWIG_1(PyObject *self, Py_ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_parsample_t_resize" "', argument " "3"" of type '" "std::vector< ParameterSample >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< ParameterSample >::value_type * >(argp3); - (arg1)->resize(arg2,(std::vector< ParameterSample >::value_type const &)*arg3); + { + try { + (arg1)->resize(arg2,(std::vector< ParameterSample >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27762,7 +28692,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_insert__SWIG_0(PyObject *self, Py_ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_parsample_t_insert" "', argument " "3"" of type '" "std::vector< ParameterSample >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< ParameterSample >::value_type * >(argp3); - result = std_vector_Sl_ParameterSample_Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(ParameterSample const &)*arg3); + { + try { + result = std_vector_Sl_ParameterSample_Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(ParameterSample const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ParameterSample >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27816,7 +28756,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_insert__SWIG_1(PyObject *self, Py_ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_parsample_t_insert" "', argument " "4"" of type '" "std::vector< ParameterSample >::value_type const &""'"); } arg4 = reinterpret_cast< std::vector< ParameterSample >::value_type * >(argp4); - std_vector_Sl_ParameterSample_Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(ParameterSample const &)*arg4); + { + try { + std_vector_Sl_ParameterSample_Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(ParameterSample const &)*arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27903,7 +28853,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_reserve(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_parsample_t_reserve" "', argument " "2"" of type '" "std::vector< ParameterSample >::size_type""'"); } arg2 = static_cast< std::vector< ParameterSample >::size_type >(val2); - (arg1)->reserve(arg2); + { + try { + (arg1)->reserve(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27926,7 +28886,17 @@ SWIGINTERN PyObject *_wrap_vector_parsample_t_capacity(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_parsample_t_capacity" "', argument " "1"" of type '" "std::vector< ParameterSample > const *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - result = ((std::vector< ParameterSample > const *)arg1)->capacity(); + { + try { + result = ((std::vector< ParameterSample > const *)arg1)->capacity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -27948,7 +28918,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_parsample_t(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_parsample_t" "', argument " "1"" of type '" "std::vector< ParameterSample > *""'"); } arg1 = reinterpret_cast< std::vector< ParameterSample > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28104,7 +29084,17 @@ SWIGINTERN PyObject *_wrap_new_ParaMeta(PyObject *self, PyObject *args) { ParaMeta *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_ParaMeta", 0, 0, 0)) SWIG_fail; - result = (ParaMeta *)new ParaMeta(); + { + try { + result = (ParaMeta *)new ParaMeta(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParaMeta, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -28126,7 +29116,17 @@ SWIGINTERN PyObject *_wrap_delete_ParaMeta(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ParaMeta" "', argument " "1"" of type '" "ParaMeta *""'"); } arg1 = reinterpret_cast< ParaMeta * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28152,14 +29152,24 @@ SWIGINTERN PyObject *_wrap_new_INode__SWIG_0(PyObject *self, Py_ssize_t nobjs, P if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; arg1 = swig_obj[0]; - if ( arg1 != Py_None ) { - /* subclassed */ - result = (INode *)new SwigDirector_INode(arg1); - } else { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); - SWIG_fail; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (INode *)new SwigDirector_INode(arg1); + } else { + SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + SWIG_fail; + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -28184,14 +29194,24 @@ SWIGINTERN PyObject *_wrap_new_INode__SWIG_1(PyObject *self, Py_ssize_t nobjs, P arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - if ( arg1 != Py_None ) { - /* subclassed */ - result = (INode *)new SwigDirector_INode(arg1,arg2); - } else { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); - SWIG_fail; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (INode *)new SwigDirector_INode(arg1,arg2); + } else { + SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + SWIG_fail; + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -28249,7 +29269,17 @@ SWIGINTERN PyObject *_wrap_delete_INode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_INode" "', argument " "1"" of type '" "INode *""'"); } arg1 = reinterpret_cast< INode * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28277,10 +29307,20 @@ SWIGINTERN PyObject *_wrap_INode_className(PyObject *self, PyObject *args) { director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - Swig::DirectorPureVirtualException::raise("INode::className"); - } else { - result = ((INode const *)arg1)->className(); + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("INode::className"); + } else { + result = ((INode const *)arg1)->className(); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -28312,10 +29352,20 @@ SWIGINTERN PyObject *_wrap_INode_nodeChildren(PyObject *self, PyObject *args) { director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = ((INode const *)arg1)->INode::nodeChildren(); - } else { - result = ((INode const *)arg1)->nodeChildren(); + { + try { + if (upcall) { + result = ((INode const *)arg1)->INode::nodeChildren(); + } else { + result = ((INode const *)arg1)->nodeChildren(); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -28342,7 +29392,17 @@ SWIGINTERN PyObject *_wrap_INode_nodeOffspring(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "INode_nodeOffspring" "', argument " "1"" of type '" "INode const *""'"); } arg1 = reinterpret_cast< INode * >(argp1); - result = ((INode const *)arg1)->nodeOffspring(); + { + try { + result = ((INode const *)arg1)->nodeOffspring(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -28370,10 +29430,20 @@ SWIGINTERN PyObject *_wrap_INode_parDefs(PyObject *self, PyObject *args) { director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = ((INode const *)arg1)->INode::parDefs(); - } else { - result = ((INode const *)arg1)->parDefs(); + { + try { + if (upcall) { + result = ((INode const *)arg1)->INode::parDefs(); + } else { + result = ((INode const *)arg1)->parDefs(); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -28400,7 +29470,17 @@ SWIGINTERN PyObject *_wrap_INode_pars(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "INode_pars" "', argument " "1"" of type '" "INode const *""'"); } arg1 = reinterpret_cast< INode * >(argp1); - result = (std::vector< double,std::allocator< double > > *) &((INode const *)arg1)->pars(); + { + try { + result = (std::vector< double,std::allocator< double > > *) &((INode const *)arg1)->pars(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(*result)); return resultobj; fail: @@ -28423,7 +29503,17 @@ SWIGINTERN PyObject *_wrap_INode_nPars(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "INode_nPars" "', argument " "1"" of type '" "INode const *""'"); } arg1 = reinterpret_cast< INode * >(argp1); - result = ((INode const *)arg1)->nPars(); + { + try { + result = ((INode const *)arg1)->nPars(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -28453,7 +29543,17 @@ SWIGINTERN PyObject *_wrap_INode_parVal(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "INode_parVal" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (double)((INode const *)arg1)->parVal(arg2); + { + try { + result = (double)((INode const *)arg1)->parVal(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -28481,10 +29581,20 @@ SWIGINTERN PyObject *_wrap_INode_validate(PyObject *self, PyObject *args) { director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = ((INode const *)arg1)->INode::validate(); - } else { - result = ((INode const *)arg1)->validate(); + { + try { + if (upcall) { + result = ((INode const *)arg1)->INode::validate(); + } else { + result = ((INode const *)arg1)->validate(); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -28510,7 +29620,17 @@ SWIGINTERN PyObject *_wrap_INode_validateOrThrow(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "INode_validateOrThrow" "', argument " "1"" of type '" "INode const *""'"); } arg1 = reinterpret_cast< INode * >(argp1); - ((INode const *)arg1)->validateOrThrow(); + { + try { + ((INode const *)arg1)->validateOrThrow(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28664,7 +29784,17 @@ SWIGINTERN PyObject *_wrap_new_ParameterSample(PyObject *self, PyObject *args) { ParameterSample *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_ParameterSample", 0, 0, 0)) SWIG_fail; - result = (ParameterSample *)new ParameterSample(); + { + try { + result = (ParameterSample *)new ParameterSample(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParameterSample, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -28686,7 +29816,17 @@ SWIGINTERN PyObject *_wrap_delete_ParameterSample(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ParameterSample" "', argument " "1"" of type '" "ParameterSample *""'"); } arg1 = reinterpret_cast< ParameterSample * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28720,7 +29860,17 @@ SWIGINTERN PyObject *_wrap_IDistribution1D_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDistribution1D_clone" "', argument " "1"" of type '" "IDistribution1D const *""'"); } arg1 = reinterpret_cast< IDistribution1D * >(argp1); - result = (IDistribution1D *)((IDistribution1D const *)arg1)->clone(); + { + try { + result = (IDistribution1D *)((IDistribution1D const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDistribution1D, 0 | 0 ); return resultobj; fail: @@ -28749,7 +29899,17 @@ SWIGINTERN PyObject *_wrap_IDistribution1D_setNSamples(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDistribution1D_setNSamples" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - (arg1)->setNSamples(arg2); + { + try { + (arg1)->setNSamples(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28778,7 +29938,17 @@ SWIGINTERN PyObject *_wrap_IDistribution1D_setRelSamplingWidth(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDistribution1D_setRelSamplingWidth" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setRelSamplingWidth(arg2); + { + try { + (arg1)->setRelSamplingWidth(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28801,7 +29971,17 @@ SWIGINTERN PyObject *_wrap_IDistribution1D_distributionSamples(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDistribution1D_distributionSamples" "', argument " "1"" of type '" "IDistribution1D const *""'"); } arg1 = reinterpret_cast< IDistribution1D * >(argp1); - result = ((IDistribution1D const *)arg1)->distributionSamples(); + { + try { + result = ((IDistribution1D const *)arg1)->distributionSamples(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< ParameterSample,std::allocator< ParameterSample > > >(result)); return resultobj; fail: @@ -28823,7 +30003,17 @@ SWIGINTERN PyObject *_wrap_delete_IDistribution1D(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDistribution1D" "', argument " "1"" of type '" "IDistribution1D *""'"); } arg1 = reinterpret_cast< IDistribution1D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28861,7 +30051,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionGate__SWIG_0(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DistributionGate" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (DistributionGate *)new DistributionGate(arg1,arg2); + { + try { + result = (DistributionGate *)new DistributionGate(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionGate, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -28898,7 +30098,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionGate__SWIG_1(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DistributionGate" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = (DistributionGate *)new DistributionGate(arg1,arg2,arg3); + { + try { + result = (DistributionGate *)new DistributionGate(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionGate, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -28927,7 +30137,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionGate__SWIG_2(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DistributionGate" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (DistributionGate *)new DistributionGate(arg1,arg2); + { + try { + result = (DistributionGate *)new DistributionGate(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionGate, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29021,7 +30241,17 @@ SWIGINTERN PyObject *_wrap_DistributionGate_className(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionGate_className" "', argument " "1"" of type '" "DistributionGate const *""'"); } arg1 = reinterpret_cast< DistributionGate * >(argp1); - result = ((DistributionGate const *)arg1)->className(); + { + try { + result = ((DistributionGate const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -29044,7 +30274,17 @@ SWIGINTERN PyObject *_wrap_DistributionGate_clone(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionGate_clone" "', argument " "1"" of type '" "DistributionGate const *""'"); } arg1 = reinterpret_cast< DistributionGate * >(argp1); - result = (DistributionGate *)((DistributionGate const *)arg1)->clone(); + { + try { + result = (DistributionGate *)((DistributionGate const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionGate, 0 | 0 ); return resultobj; fail: @@ -29067,7 +30307,17 @@ SWIGINTERN PyObject *_wrap_DistributionGate_distributionSamples(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionGate_distributionSamples" "', argument " "1"" of type '" "DistributionGate const *""'"); } arg1 = reinterpret_cast< DistributionGate * >(argp1); - result = ((DistributionGate const *)arg1)->distributionSamples(); + { + try { + result = ((DistributionGate const *)arg1)->distributionSamples(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< ParameterSample,std::allocator< ParameterSample > > >(result)); return resultobj; fail: @@ -29089,7 +30339,17 @@ SWIGINTERN PyObject *_wrap_delete_DistributionGate(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DistributionGate" "', argument " "1"" of type '" "DistributionGate *""'"); } arg1 = reinterpret_cast< DistributionGate * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29139,7 +30399,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionLorentz__SWIG_0(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DistributionLorentz" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (DistributionLorentz *)new DistributionLorentz(arg1,arg2,arg3); + { + try { + result = (DistributionLorentz *)new DistributionLorentz(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29184,7 +30454,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionLorentz__SWIG_1(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DistributionLorentz" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (DistributionLorentz *)new DistributionLorentz(arg1,arg2,arg3,arg4); + { + try { + result = (DistributionLorentz *)new DistributionLorentz(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29221,7 +30501,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionLorentz__SWIG_2(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DistributionLorentz" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = (DistributionLorentz *)new DistributionLorentz(arg1,arg2,arg3); + { + try { + result = (DistributionLorentz *)new DistributionLorentz(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29250,7 +30540,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionLorentz__SWIG_3(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DistributionLorentz" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (DistributionLorentz *)new DistributionLorentz(arg1,arg2); + { + try { + result = (DistributionLorentz *)new DistributionLorentz(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29379,7 +30679,17 @@ SWIGINTERN PyObject *_wrap_DistributionLorentz_className(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionLorentz_className" "', argument " "1"" of type '" "DistributionLorentz const *""'"); } arg1 = reinterpret_cast< DistributionLorentz * >(argp1); - result = ((DistributionLorentz const *)arg1)->className(); + { + try { + result = ((DistributionLorentz const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -29402,7 +30712,17 @@ SWIGINTERN PyObject *_wrap_DistributionLorentz_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionLorentz_clone" "', argument " "1"" of type '" "DistributionLorentz const *""'"); } arg1 = reinterpret_cast< DistributionLorentz * >(argp1); - result = (DistributionLorentz *)((DistributionLorentz const *)arg1)->clone(); + { + try { + result = (DistributionLorentz *)((DistributionLorentz const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLorentz, 0 | 0 ); return resultobj; fail: @@ -29425,7 +30745,17 @@ SWIGINTERN PyObject *_wrap_DistributionLorentz_distributionSamples(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionLorentz_distributionSamples" "', argument " "1"" of type '" "DistributionLorentz const *""'"); } arg1 = reinterpret_cast< DistributionLorentz * >(argp1); - result = ((DistributionLorentz const *)arg1)->distributionSamples(); + { + try { + result = ((DistributionLorentz const *)arg1)->distributionSamples(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< ParameterSample,std::allocator< ParameterSample > > >(result)); return resultobj; fail: @@ -29447,7 +30777,17 @@ SWIGINTERN PyObject *_wrap_delete_DistributionLorentz(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DistributionLorentz" "', argument " "1"" of type '" "DistributionLorentz *""'"); } arg1 = reinterpret_cast< DistributionLorentz * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29497,7 +30837,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionGaussian__SWIG_0(PyObject *self, Py_s SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DistributionGaussian" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (DistributionGaussian *)new DistributionGaussian(arg1,arg2,arg3); + { + try { + result = (DistributionGaussian *)new DistributionGaussian(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionGaussian, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29542,7 +30892,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionGaussian__SWIG_1(PyObject *self, Py_s SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DistributionGaussian" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (DistributionGaussian *)new DistributionGaussian(arg1,arg2,arg3,arg4); + { + try { + result = (DistributionGaussian *)new DistributionGaussian(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionGaussian, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29579,7 +30939,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionGaussian__SWIG_2(PyObject *self, Py_s SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DistributionGaussian" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = (DistributionGaussian *)new DistributionGaussian(arg1,arg2,arg3); + { + try { + result = (DistributionGaussian *)new DistributionGaussian(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionGaussian, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29608,7 +30978,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionGaussian__SWIG_3(PyObject *self, Py_s SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DistributionGaussian" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (DistributionGaussian *)new DistributionGaussian(arg1,arg2); + { + try { + result = (DistributionGaussian *)new DistributionGaussian(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionGaussian, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29737,7 +31117,17 @@ SWIGINTERN PyObject *_wrap_DistributionGaussian_clone(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionGaussian_clone" "', argument " "1"" of type '" "DistributionGaussian const *""'"); } arg1 = reinterpret_cast< DistributionGaussian * >(argp1); - result = (DistributionGaussian *)((DistributionGaussian const *)arg1)->clone(); + { + try { + result = (DistributionGaussian *)((DistributionGaussian const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionGaussian, 0 | 0 ); return resultobj; fail: @@ -29760,7 +31150,17 @@ SWIGINTERN PyObject *_wrap_DistributionGaussian_className(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionGaussian_className" "', argument " "1"" of type '" "DistributionGaussian const *""'"); } arg1 = reinterpret_cast< DistributionGaussian * >(argp1); - result = ((DistributionGaussian const *)arg1)->className(); + { + try { + result = ((DistributionGaussian const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -29783,7 +31183,17 @@ SWIGINTERN PyObject *_wrap_DistributionGaussian_distributionSamples(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionGaussian_distributionSamples" "', argument " "1"" of type '" "DistributionGaussian const *""'"); } arg1 = reinterpret_cast< DistributionGaussian * >(argp1); - result = ((DistributionGaussian const *)arg1)->distributionSamples(); + { + try { + result = ((DistributionGaussian const *)arg1)->distributionSamples(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< ParameterSample,std::allocator< ParameterSample > > >(result)); return resultobj; fail: @@ -29805,7 +31215,17 @@ SWIGINTERN PyObject *_wrap_delete_DistributionGaussian(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DistributionGaussian" "', argument " "1"" of type '" "DistributionGaussian *""'"); } arg1 = reinterpret_cast< DistributionGaussian * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29855,7 +31275,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionLogNormal__SWIG_0(PyObject *self, Py_ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DistributionLogNormal" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (DistributionLogNormal *)new DistributionLogNormal(arg1,arg2,arg3); + { + try { + result = (DistributionLogNormal *)new DistributionLogNormal(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLogNormal, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29900,7 +31330,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionLogNormal__SWIG_1(PyObject *self, Py_ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DistributionLogNormal" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (DistributionLogNormal *)new DistributionLogNormal(arg1,arg2,arg3,arg4); + { + try { + result = (DistributionLogNormal *)new DistributionLogNormal(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLogNormal, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29937,7 +31377,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionLogNormal__SWIG_2(PyObject *self, Py_ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DistributionLogNormal" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = (DistributionLogNormal *)new DistributionLogNormal(arg1,arg2,arg3); + { + try { + result = (DistributionLogNormal *)new DistributionLogNormal(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLogNormal, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29966,7 +31416,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionLogNormal__SWIG_3(PyObject *self, Py_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DistributionLogNormal" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (DistributionLogNormal *)new DistributionLogNormal(arg1,arg2); + { + try { + result = (DistributionLogNormal *)new DistributionLogNormal(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLogNormal, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30095,7 +31555,17 @@ SWIGINTERN PyObject *_wrap_DistributionLogNormal_className(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionLogNormal_className" "', argument " "1"" of type '" "DistributionLogNormal const *""'"); } arg1 = reinterpret_cast< DistributionLogNormal * >(argp1); - result = ((DistributionLogNormal const *)arg1)->className(); + { + try { + result = ((DistributionLogNormal const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -30118,7 +31588,17 @@ SWIGINTERN PyObject *_wrap_DistributionLogNormal_clone(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionLogNormal_clone" "', argument " "1"" of type '" "DistributionLogNormal const *""'"); } arg1 = reinterpret_cast< DistributionLogNormal * >(argp1); - result = (DistributionLogNormal *)((DistributionLogNormal const *)arg1)->clone(); + { + try { + result = (DistributionLogNormal *)((DistributionLogNormal const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionLogNormal, 0 | 0 ); return resultobj; fail: @@ -30141,7 +31621,17 @@ SWIGINTERN PyObject *_wrap_DistributionLogNormal_distributionSamples(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionLogNormal_distributionSamples" "', argument " "1"" of type '" "DistributionLogNormal const *""'"); } arg1 = reinterpret_cast< DistributionLogNormal * >(argp1); - result = ((DistributionLogNormal const *)arg1)->distributionSamples(); + { + try { + result = ((DistributionLogNormal const *)arg1)->distributionSamples(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< ParameterSample,std::allocator< ParameterSample > > >(result)); return resultobj; fail: @@ -30163,7 +31653,17 @@ SWIGINTERN PyObject *_wrap_delete_DistributionLogNormal(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DistributionLogNormal" "', argument " "1"" of type '" "DistributionLogNormal *""'"); } arg1 = reinterpret_cast< DistributionLogNormal * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30205,7 +31705,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionCosine__SWIG_0(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DistributionCosine" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (DistributionCosine *)new DistributionCosine(arg1,arg2); + { + try { + result = (DistributionCosine *)new DistributionCosine(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionCosine, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30242,7 +31752,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionCosine__SWIG_1(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DistributionCosine" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - result = (DistributionCosine *)new DistributionCosine(arg1,arg2,arg3); + { + try { + result = (DistributionCosine *)new DistributionCosine(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionCosine, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30271,7 +31791,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionCosine__SWIG_2(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DistributionCosine" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (DistributionCosine *)new DistributionCosine(arg1,arg2); + { + try { + result = (DistributionCosine *)new DistributionCosine(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionCosine, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30365,7 +31895,17 @@ SWIGINTERN PyObject *_wrap_DistributionCosine_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionCosine_className" "', argument " "1"" of type '" "DistributionCosine const *""'"); } arg1 = reinterpret_cast< DistributionCosine * >(argp1); - result = ((DistributionCosine const *)arg1)->className(); + { + try { + result = ((DistributionCosine const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -30388,7 +31928,17 @@ SWIGINTERN PyObject *_wrap_DistributionCosine_clone(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionCosine_clone" "', argument " "1"" of type '" "DistributionCosine const *""'"); } arg1 = reinterpret_cast< DistributionCosine * >(argp1); - result = (DistributionCosine *)((DistributionCosine const *)arg1)->clone(); + { + try { + result = (DistributionCosine *)((DistributionCosine const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionCosine, 0 | 0 ); return resultobj; fail: @@ -30411,7 +31961,17 @@ SWIGINTERN PyObject *_wrap_DistributionCosine_distributionSamples(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionCosine_distributionSamples" "', argument " "1"" of type '" "DistributionCosine const *""'"); } arg1 = reinterpret_cast< DistributionCosine * >(argp1); - result = ((DistributionCosine const *)arg1)->distributionSamples(); + { + try { + result = ((DistributionCosine const *)arg1)->distributionSamples(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< ParameterSample,std::allocator< ParameterSample > > >(result)); return resultobj; fail: @@ -30433,7 +31993,17 @@ SWIGINTERN PyObject *_wrap_delete_DistributionCosine(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DistributionCosine" "', argument " "1"" of type '" "DistributionCosine *""'"); } arg1 = reinterpret_cast< DistributionCosine * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30475,7 +32045,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionTrapezoid__SWIG_0(PyObject *self, Py_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DistributionTrapezoid" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (DistributionTrapezoid *)new DistributionTrapezoid(arg1,arg2); + { + try { + result = (DistributionTrapezoid *)new DistributionTrapezoid(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionTrapezoid, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30528,7 +32108,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionTrapezoid__SWIG_1(PyObject *self, Py_ SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_DistributionTrapezoid" "', argument " "5"" of type '" "size_t""'"); } arg5 = static_cast< size_t >(val5); - result = (DistributionTrapezoid *)new DistributionTrapezoid(arg1,arg2,arg3,arg4,arg5); + { + try { + result = (DistributionTrapezoid *)new DistributionTrapezoid(arg1,arg2,arg3,arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionTrapezoid, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30573,7 +32163,17 @@ SWIGINTERN PyObject *_wrap_new_DistributionTrapezoid__SWIG_2(PyObject *self, Py_ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DistributionTrapezoid" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (DistributionTrapezoid *)new DistributionTrapezoid(arg1,arg2,arg3,arg4); + { + try { + result = (DistributionTrapezoid *)new DistributionTrapezoid(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionTrapezoid, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30691,7 +32291,17 @@ SWIGINTERN PyObject *_wrap_DistributionTrapezoid_className(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionTrapezoid_className" "', argument " "1"" of type '" "DistributionTrapezoid const *""'"); } arg1 = reinterpret_cast< DistributionTrapezoid * >(argp1); - result = ((DistributionTrapezoid const *)arg1)->className(); + { + try { + result = ((DistributionTrapezoid const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -30714,7 +32324,17 @@ SWIGINTERN PyObject *_wrap_DistributionTrapezoid_clone(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionTrapezoid_clone" "', argument " "1"" of type '" "DistributionTrapezoid const *""'"); } arg1 = reinterpret_cast< DistributionTrapezoid * >(argp1); - result = (DistributionTrapezoid *)((DistributionTrapezoid const *)arg1)->clone(); + { + try { + result = (DistributionTrapezoid *)((DistributionTrapezoid const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DistributionTrapezoid, 0 | 0 ); return resultobj; fail: @@ -30737,7 +32357,17 @@ SWIGINTERN PyObject *_wrap_DistributionTrapezoid_distributionSamples(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DistributionTrapezoid_distributionSamples" "', argument " "1"" of type '" "DistributionTrapezoid const *""'"); } arg1 = reinterpret_cast< DistributionTrapezoid * >(argp1); - result = ((DistributionTrapezoid const *)arg1)->distributionSamples(); + { + try { + result = ((DistributionTrapezoid const *)arg1)->distributionSamples(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< ParameterSample,std::allocator< ParameterSample > > >(result)); return resultobj; fail: @@ -30759,7 +32389,17 @@ SWIGINTERN PyObject *_wrap_delete_DistributionTrapezoid(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DistributionTrapezoid" "', argument " "1"" of type '" "DistributionTrapezoid *""'"); } arg1 = reinterpret_cast< DistributionTrapezoid * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30802,7 +32442,17 @@ SWIGINTERN PyObject *_wrap_new_ParameterDistribution__SWIG_0(PyObject *self, Py_ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ParameterDistribution" "', argument " "2"" of type '" "IDistribution1D const &""'"); } arg2 = reinterpret_cast< IDistribution1D * >(argp2); - result = (ParameterDistribution *)new ParameterDistribution(arg1,(IDistribution1D const &)*arg2); + { + try { + result = (ParameterDistribution *)new ParameterDistribution(arg1,(IDistribution1D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParameterDistribution, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30826,7 +32476,17 @@ SWIGINTERN PyObject *_wrap_new_ParameterDistribution__SWIG_1(PyObject *self, Py_ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ParameterDistribution" "', argument " "1"" of type '" "ParameterDistribution const &""'"); } arg1 = reinterpret_cast< ParameterDistribution * >(argp1); - result = (ParameterDistribution *)new ParameterDistribution((ParameterDistribution const &)*arg1); + { + try { + result = (ParameterDistribution *)new ParameterDistribution((ParameterDistribution const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParameterDistribution, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30888,7 +32548,17 @@ SWIGINTERN PyObject *_wrap_delete_ParameterDistribution(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ParameterDistribution" "', argument " "1"" of type '" "ParameterDistribution *""'"); } arg1 = reinterpret_cast< ParameterDistribution * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30941,15 +32611,15 @@ static PyMethodDef SwigMethods[] = { { "vdouble1d_t___delslice__", _wrap_vdouble1d_t___delslice__, METH_VARARGS, "vdouble1d_t___delslice__(vdouble1d_t self, std::vector< double >::difference_type i, std::vector< double >::difference_type j)"}, { "vdouble1d_t___delitem__", _wrap_vdouble1d_t___delitem__, METH_VARARGS, "\n" "vdouble1d_t___delitem__(vdouble1d_t self, std::vector< double >::difference_type i)\n" - "vdouble1d_t___delitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble1d_t___delitem__(vdouble1d_t self, PySliceObject * slice)\n" ""}, { "vdouble1d_t___getitem__", _wrap_vdouble1d_t___getitem__, METH_VARARGS, "\n" - "vdouble1d_t___getitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble1d_t\n" + "vdouble1d_t___getitem__(vdouble1d_t self, PySliceObject * slice) -> vdouble1d_t\n" "vdouble1d_t___getitem__(vdouble1d_t self, std::vector< double >::difference_type i) -> std::vector< double >::value_type const &\n" ""}, { "vdouble1d_t___setitem__", _wrap_vdouble1d_t___setitem__, METH_VARARGS, "\n" - "vdouble1d_t___setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice, vdouble1d_t v)\n" - "vdouble1d_t___setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble1d_t___setitem__(vdouble1d_t self, PySliceObject * slice, vdouble1d_t v)\n" + "vdouble1d_t___setitem__(vdouble1d_t self, PySliceObject * slice)\n" "vdouble1d_t___setitem__(vdouble1d_t self, std::vector< double >::difference_type i, std::vector< double >::value_type const & x)\n" ""}, { "vdouble1d_t_pop", _wrap_vdouble1d_t_pop, METH_O, "vdouble1d_t_pop(vdouble1d_t self) -> std::vector< double >::value_type"}, @@ -31003,15 +32673,15 @@ static PyMethodDef SwigMethods[] = { { "vdouble2d_t___delslice__", _wrap_vdouble2d_t___delslice__, METH_VARARGS, "vdouble2d_t___delslice__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::difference_type j)"}, { "vdouble2d_t___delitem__", _wrap_vdouble2d_t___delitem__, METH_VARARGS, "\n" "vdouble2d_t___delitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i)\n" - "vdouble2d_t___delitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble2d_t___delitem__(vdouble2d_t self, PySliceObject * slice)\n" ""}, { "vdouble2d_t___getitem__", _wrap_vdouble2d_t___getitem__, METH_VARARGS, "\n" - "vdouble2d_t___getitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble2d_t\n" + "vdouble2d_t___getitem__(vdouble2d_t self, PySliceObject * slice) -> vdouble2d_t\n" "vdouble2d_t___getitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i) -> vdouble1d_t\n" ""}, { "vdouble2d_t___setitem__", _wrap_vdouble2d_t___setitem__, METH_VARARGS, "\n" - "vdouble2d_t___setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice, vdouble2d_t v)\n" - "vdouble2d_t___setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble2d_t___setitem__(vdouble2d_t self, PySliceObject * slice, vdouble2d_t v)\n" + "vdouble2d_t___setitem__(vdouble2d_t self, PySliceObject * slice)\n" "vdouble2d_t___setitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i, vdouble1d_t x)\n" ""}, { "vdouble2d_t_pop", _wrap_vdouble2d_t_pop, METH_O, "vdouble2d_t_pop(vdouble2d_t self) -> vdouble1d_t"}, @@ -31065,15 +32735,15 @@ static PyMethodDef SwigMethods[] = { { "vector_integer_t___delslice__", _wrap_vector_integer_t___delslice__, METH_VARARGS, "vector_integer_t___delslice__(vector_integer_t self, std::vector< int >::difference_type i, std::vector< int >::difference_type j)"}, { "vector_integer_t___delitem__", _wrap_vector_integer_t___delitem__, METH_VARARGS, "\n" "vector_integer_t___delitem__(vector_integer_t self, std::vector< int >::difference_type i)\n" - "vector_integer_t___delitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_integer_t___delitem__(vector_integer_t self, PySliceObject * slice)\n" ""}, { "vector_integer_t___getitem__", _wrap_vector_integer_t___getitem__, METH_VARARGS, "\n" - "vector_integer_t___getitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) -> vector_integer_t\n" + "vector_integer_t___getitem__(vector_integer_t self, PySliceObject * slice) -> vector_integer_t\n" "vector_integer_t___getitem__(vector_integer_t self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const &\n" ""}, { "vector_integer_t___setitem__", _wrap_vector_integer_t___setitem__, METH_VARARGS, "\n" - "vector_integer_t___setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice, vector_integer_t v)\n" - "vector_integer_t___setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_integer_t___setitem__(vector_integer_t self, PySliceObject * slice, vector_integer_t v)\n" + "vector_integer_t___setitem__(vector_integer_t self, PySliceObject * slice)\n" "vector_integer_t___setitem__(vector_integer_t self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x)\n" ""}, { "vector_integer_t_pop", _wrap_vector_integer_t_pop, METH_O, "vector_integer_t_pop(vector_integer_t self) -> std::vector< int >::value_type"}, @@ -31127,15 +32797,15 @@ static PyMethodDef SwigMethods[] = { { "vinteger2d_t___delslice__", _wrap_vinteger2d_t___delslice__, METH_VARARGS, "vinteger2d_t___delslice__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i, std::vector< std::vector< int > >::difference_type j)"}, { "vinteger2d_t___delitem__", _wrap_vinteger2d_t___delitem__, METH_VARARGS, "\n" "vinteger2d_t___delitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i)\n" - "vinteger2d_t___delitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vinteger2d_t___delitem__(vinteger2d_t self, PySliceObject * slice)\n" ""}, { "vinteger2d_t___getitem__", _wrap_vinteger2d_t___getitem__, METH_VARARGS, "\n" - "vinteger2d_t___getitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) -> vinteger2d_t\n" + "vinteger2d_t___getitem__(vinteger2d_t self, PySliceObject * slice) -> vinteger2d_t\n" "vinteger2d_t___getitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i) -> vector_integer_t\n" ""}, { "vinteger2d_t___setitem__", _wrap_vinteger2d_t___setitem__, METH_VARARGS, "\n" - "vinteger2d_t___setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice, vinteger2d_t v)\n" - "vinteger2d_t___setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vinteger2d_t___setitem__(vinteger2d_t self, PySliceObject * slice, vinteger2d_t v)\n" + "vinteger2d_t___setitem__(vinteger2d_t self, PySliceObject * slice)\n" "vinteger2d_t___setitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i, vector_integer_t x)\n" ""}, { "vinteger2d_t_pop", _wrap_vinteger2d_t_pop, METH_O, "vinteger2d_t_pop(vinteger2d_t self) -> vector_integer_t"}, @@ -31189,15 +32859,15 @@ static PyMethodDef SwigMethods[] = { { "vector_longinteger_t___delslice__", _wrap_vector_longinteger_t___delslice__, METH_VARARGS, "vector_longinteger_t___delslice__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i, std::vector< unsigned long >::difference_type j)"}, { "vector_longinteger_t___delitem__", _wrap_vector_longinteger_t___delitem__, METH_VARARGS, "\n" "vector_longinteger_t___delitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i)\n" - "vector_longinteger_t___delitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_longinteger_t___delitem__(vector_longinteger_t self, PySliceObject * slice)\n" ""}, { "vector_longinteger_t___getitem__", _wrap_vector_longinteger_t___getitem__, METH_VARARGS, "\n" - "vector_longinteger_t___getitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) -> vector_longinteger_t\n" + "vector_longinteger_t___getitem__(vector_longinteger_t self, PySliceObject * slice) -> vector_longinteger_t\n" "vector_longinteger_t___getitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i) -> std::vector< unsigned long >::value_type const &\n" ""}, { "vector_longinteger_t___setitem__", _wrap_vector_longinteger_t___setitem__, METH_VARARGS, "\n" - "vector_longinteger_t___setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice, vector_longinteger_t v)\n" - "vector_longinteger_t___setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_longinteger_t___setitem__(vector_longinteger_t self, PySliceObject * slice, vector_longinteger_t v)\n" + "vector_longinteger_t___setitem__(vector_longinteger_t self, PySliceObject * slice)\n" "vector_longinteger_t___setitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i, std::vector< unsigned long >::value_type const & x)\n" ""}, { "vector_longinteger_t_pop", _wrap_vector_longinteger_t_pop, METH_O, "vector_longinteger_t_pop(vector_longinteger_t self) -> std::vector< unsigned long >::value_type"}, @@ -31251,15 +32921,15 @@ static PyMethodDef SwigMethods[] = { { "vector_complex_t___delslice__", _wrap_vector_complex_t___delslice__, METH_VARARGS, "vector_complex_t___delslice__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i, std::vector< std::complex< double > >::difference_type j)"}, { "vector_complex_t___delitem__", _wrap_vector_complex_t___delitem__, METH_VARARGS, "\n" "vector_complex_t___delitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i)\n" - "vector_complex_t___delitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_complex_t___delitem__(vector_complex_t self, PySliceObject * slice)\n" ""}, { "vector_complex_t___getitem__", _wrap_vector_complex_t___getitem__, METH_VARARGS, "\n" - "vector_complex_t___getitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) -> vector_complex_t\n" + "vector_complex_t___getitem__(vector_complex_t self, PySliceObject * slice) -> vector_complex_t\n" "vector_complex_t___getitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i) -> std::vector< std::complex< double > >::value_type const &\n" ""}, { "vector_complex_t___setitem__", _wrap_vector_complex_t___setitem__, METH_VARARGS, "\n" - "vector_complex_t___setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice, vector_complex_t v)\n" - "vector_complex_t___setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_complex_t___setitem__(vector_complex_t self, PySliceObject * slice, vector_complex_t v)\n" + "vector_complex_t___setitem__(vector_complex_t self, PySliceObject * slice)\n" "vector_complex_t___setitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i, std::vector< std::complex< double > >::value_type const & x)\n" ""}, { "vector_complex_t_pop", _wrap_vector_complex_t_pop, METH_O, "vector_complex_t_pop(vector_complex_t self) -> std::vector< std::complex< double > >::value_type"}, @@ -31313,15 +32983,15 @@ static PyMethodDef SwigMethods[] = { { "vector_string_t___delslice__", _wrap_vector_string_t___delslice__, METH_VARARGS, "vector_string_t___delslice__(vector_string_t self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j)"}, { "vector_string_t___delitem__", _wrap_vector_string_t___delitem__, METH_VARARGS, "\n" "vector_string_t___delitem__(vector_string_t self, std::vector< std::string >::difference_type i)\n" - "vector_string_t___delitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_string_t___delitem__(vector_string_t self, PySliceObject * slice)\n" ""}, { "vector_string_t___getitem__", _wrap_vector_string_t___getitem__, METH_VARARGS, "\n" - "vector_string_t___getitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) -> vector_string_t\n" + "vector_string_t___getitem__(vector_string_t self, PySliceObject * slice) -> vector_string_t\n" "vector_string_t___getitem__(vector_string_t self, std::vector< std::string >::difference_type i) -> std::vector< std::string >::value_type const &\n" ""}, { "vector_string_t___setitem__", _wrap_vector_string_t___setitem__, METH_VARARGS, "\n" - "vector_string_t___setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice, vector_string_t v)\n" - "vector_string_t___setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_string_t___setitem__(vector_string_t self, PySliceObject * slice, vector_string_t v)\n" + "vector_string_t___setitem__(vector_string_t self, PySliceObject * slice)\n" "vector_string_t___setitem__(vector_string_t self, std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const & x)\n" ""}, { "vector_string_t_pop", _wrap_vector_string_t_pop, METH_O, "vector_string_t_pop(vector_string_t self) -> std::vector< std::string >::value_type"}, @@ -31431,15 +33101,15 @@ static PyMethodDef SwigMethods[] = { { "vector_pvacuum_double_t___delslice__", _wrap_vector_pvacuum_double_t___delslice__, METH_VARARGS, "vector_pvacuum_double_t___delslice__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i, std::vector< std::pair< double,double > >::difference_type j)"}, { "vector_pvacuum_double_t___delitem__", _wrap_vector_pvacuum_double_t___delitem__, METH_VARARGS, "\n" "vector_pvacuum_double_t___delitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i)\n" - "vector_pvacuum_double_t___delitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_pvacuum_double_t___delitem__(vector_pvacuum_double_t self, PySliceObject * slice)\n" ""}, { "vector_pvacuum_double_t___getitem__", _wrap_vector_pvacuum_double_t___getitem__, METH_VARARGS, "\n" - "vector_pvacuum_double_t___getitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) -> vector_pvacuum_double_t\n" + "vector_pvacuum_double_t___getitem__(vector_pvacuum_double_t self, PySliceObject * slice) -> vector_pvacuum_double_t\n" "vector_pvacuum_double_t___getitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i) -> pvacuum_double_t\n" ""}, { "vector_pvacuum_double_t___setitem__", _wrap_vector_pvacuum_double_t___setitem__, METH_VARARGS, "\n" - "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice, vector_pvacuum_double_t v)\n" - "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, PySliceObject * slice, vector_pvacuum_double_t v)\n" + "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, PySliceObject * slice)\n" "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i, pvacuum_double_t x)\n" ""}, { "vector_pvacuum_double_t_pop", _wrap_vector_pvacuum_double_t_pop, METH_O, "vector_pvacuum_double_t_pop(vector_pvacuum_double_t self) -> pvacuum_double_t"}, @@ -31493,15 +33163,15 @@ static PyMethodDef SwigMethods[] = { { "swig_dummy_type_const_inode_vector___delslice__", _wrap_swig_dummy_type_const_inode_vector___delslice__, METH_VARARGS, "swig_dummy_type_const_inode_vector___delslice__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i, std::vector< INode const * >::difference_type j)"}, { "swig_dummy_type_const_inode_vector___delitem__", _wrap_swig_dummy_type_const_inode_vector___delitem__, METH_VARARGS, "\n" "swig_dummy_type_const_inode_vector___delitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i)\n" - "swig_dummy_type_const_inode_vector___delitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice)\n" + "swig_dummy_type_const_inode_vector___delitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice)\n" ""}, { "swig_dummy_type_const_inode_vector___getitem__", _wrap_swig_dummy_type_const_inode_vector___getitem__, METH_VARARGS, "\n" - "swig_dummy_type_const_inode_vector___getitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice) -> swig_dummy_type_const_inode_vector\n" + "swig_dummy_type_const_inode_vector___getitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice) -> swig_dummy_type_const_inode_vector\n" "swig_dummy_type_const_inode_vector___getitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i) -> INode\n" ""}, { "swig_dummy_type_const_inode_vector___setitem__", _wrap_swig_dummy_type_const_inode_vector___setitem__, METH_VARARGS, "\n" - "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice, swig_dummy_type_const_inode_vector v)\n" - "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice)\n" + "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice, swig_dummy_type_const_inode_vector v)\n" + "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice)\n" "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i, INode x)\n" ""}, { "swig_dummy_type_const_inode_vector_pop", _wrap_swig_dummy_type_const_inode_vector_pop, METH_O, "swig_dummy_type_const_inode_vector_pop(swig_dummy_type_const_inode_vector self) -> INode"}, @@ -31555,15 +33225,15 @@ static PyMethodDef SwigMethods[] = { { "vector_parsample_t___delslice__", _wrap_vector_parsample_t___delslice__, METH_VARARGS, "vector_parsample_t___delslice__(vector_parsample_t self, std::vector< ParameterSample >::difference_type i, std::vector< ParameterSample >::difference_type j)"}, { "vector_parsample_t___delitem__", _wrap_vector_parsample_t___delitem__, METH_VARARGS, "\n" "vector_parsample_t___delitem__(vector_parsample_t self, std::vector< ParameterSample >::difference_type i)\n" - "vector_parsample_t___delitem__(vector_parsample_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_parsample_t___delitem__(vector_parsample_t self, PySliceObject * slice)\n" ""}, { "vector_parsample_t___getitem__", _wrap_vector_parsample_t___getitem__, METH_VARARGS, "\n" - "vector_parsample_t___getitem__(vector_parsample_t self, SWIGPY_SLICEOBJECT * slice) -> vector_parsample_t\n" + "vector_parsample_t___getitem__(vector_parsample_t self, PySliceObject * slice) -> vector_parsample_t\n" "vector_parsample_t___getitem__(vector_parsample_t self, std::vector< ParameterSample >::difference_type i) -> ParameterSample\n" ""}, { "vector_parsample_t___setitem__", _wrap_vector_parsample_t___setitem__, METH_VARARGS, "\n" - "vector_parsample_t___setitem__(vector_parsample_t self, SWIGPY_SLICEOBJECT * slice, vector_parsample_t v)\n" - "vector_parsample_t___setitem__(vector_parsample_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_parsample_t___setitem__(vector_parsample_t self, PySliceObject * slice, vector_parsample_t v)\n" + "vector_parsample_t___setitem__(vector_parsample_t self, PySliceObject * slice)\n" "vector_parsample_t___setitem__(vector_parsample_t self, std::vector< ParameterSample >::difference_type i, ParameterSample x)\n" ""}, { "vector_parsample_t_pop", _wrap_vector_parsample_t_pop, METH_O, "vector_parsample_t_pop(vector_parsample_t self) -> ParameterSample"}, diff --git a/auto/Wrap/libBornAgainResample_wrap.cpp b/auto/Wrap/libBornAgainResample_wrap.cpp index 3c0fc7821a68d1fff7358689950fe45608563dce..ac09d05fe01d219f747620d9b820284d0b8aeb4b 100644 --- a/auto/Wrap/libBornAgainResample_wrap.cpp +++ b/auto/Wrap/libBornAgainResample_wrap.cpp @@ -9727,7 +9727,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble1d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble1d_t" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -11581,7 +11591,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble2d_t" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -13405,7 +13425,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_integer_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_integer_t" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -15259,7 +15289,17 @@ SWIGINTERN PyObject *_wrap_delete_vinteger2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vinteger2d_t" "', argument " "1"" of type '" "std::vector< std::vector< int > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -17083,7 +17123,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_longinteger_t(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_longinteger_t" "', argument " "1"" of type '" "std::vector< unsigned long > *""'"); } arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -18907,7 +18957,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_complex_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_complex_t" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -20761,7 +20821,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_string_t(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_string_t" "', argument " "1"" of type '" "std::vector< std::string > *""'"); } arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -21970,7 +22040,17 @@ SWIGINTERN PyObject *_wrap_delete_map_string_double_t(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_string_double_t" "', argument " "1"" of type '" "std::map< std::string,double > *""'"); } arg1 = reinterpret_cast< std::map< std::string,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22223,7 +22303,17 @@ SWIGINTERN PyObject *_wrap_delete_pvacuum_double_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pvacuum_double_t" "', argument " "1"" of type '" "std::pair< double,double > *""'"); } arg1 = reinterpret_cast< std::pair< double,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24077,7 +24167,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_pvacuum_double_t(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_pvacuum_double_t" "', argument " "1"" of type '" "std::vector< std::pair< double,double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24101,7 +24201,17 @@ SWIGINTERN PyObject *_wrap_new_SimulationOptions(PyObject *self, PyObject *args) SimulationOptions *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_SimulationOptions", 0, 0, 0)) SWIG_fail; - result = (SimulationOptions *)new SimulationOptions(); + { + try { + result = (SimulationOptions *)new SimulationOptions(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationOptions, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24137,7 +24247,17 @@ SWIGINTERN PyObject *_wrap_SimulationOptions_setMonteCarloIntegration__SWIG_0(Py SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimulationOptions_setMonteCarloIntegration" "', argument " "3"" of type '" "size_t""'"); } arg3 = static_cast< size_t >(val3); - (arg1)->setMonteCarloIntegration(arg2,arg3); + { + try { + (arg1)->setMonteCarloIntegration(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24165,7 +24285,17 @@ SWIGINTERN PyObject *_wrap_SimulationOptions_setMonteCarloIntegration__SWIG_1(Py SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationOptions_setMonteCarloIntegration" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setMonteCarloIntegration(arg2); + { + try { + (arg1)->setMonteCarloIntegration(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24185,7 +24315,17 @@ SWIGINTERN PyObject *_wrap_SimulationOptions_setMonteCarloIntegration__SWIG_2(Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationOptions_setMonteCarloIntegration" "', argument " "1"" of type '" "SimulationOptions *""'"); } arg1 = reinterpret_cast< SimulationOptions * >(argp1); - (arg1)->setMonteCarloIntegration(); + { + try { + (arg1)->setMonteCarloIntegration(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24278,7 +24418,17 @@ SWIGINTERN PyObject *_wrap_SimulationOptions_setNumberOfThreads(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationOptions_setNumberOfThreads" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); - (arg1)->setNumberOfThreads(arg2); + { + try { + (arg1)->setNumberOfThreads(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24307,7 +24457,17 @@ SWIGINTERN PyObject *_wrap_SimulationOptions_setNumberOfBatches(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationOptions_setNumberOfBatches" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); - (arg1)->setNumberOfBatches(arg2); + { + try { + (arg1)->setNumberOfBatches(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24336,7 +24496,17 @@ SWIGINTERN PyObject *_wrap_SimulationOptions_setIncludeSpecular(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationOptions_setIncludeSpecular" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setIncludeSpecular(arg2); + { + try { + (arg1)->setIncludeSpecular(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24365,7 +24535,17 @@ SWIGINTERN PyObject *_wrap_SimulationOptions_setUseAvgMaterials(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationOptions_setUseAvgMaterials" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setUseAvgMaterials(arg2); + { + try { + (arg1)->setUseAvgMaterials(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24387,7 +24567,17 @@ SWIGINTERN PyObject *_wrap_delete_SimulationOptions(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimulationOptions" "', argument " "1"" of type '" "SimulationOptions *""'"); } arg1 = reinterpret_cast< SimulationOptions * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24435,7 +24625,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_R3" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + { + try { + result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24448,7 +24648,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< double > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< double > *)new Vec3< double >(); + { + try { + result = (Vec3< double > *)new Vec3< double >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24514,7 +24724,17 @@ SWIGINTERN PyObject *_wrap_R3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_x" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->x(); + { + try { + result = (double)((Vec3< double > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24537,7 +24757,17 @@ SWIGINTERN PyObject *_wrap_R3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_y" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->y(); + { + try { + result = (double)((Vec3< double > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24560,7 +24790,17 @@ SWIGINTERN PyObject *_wrap_R3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_z" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->z(); + { + try { + result = (double)((Vec3< double > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24591,7 +24831,17 @@ SWIGINTERN PyObject *_wrap_R3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setX((double const &)*arg2); + { + try { + (arg1)->setX((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24622,7 +24872,17 @@ SWIGINTERN PyObject *_wrap_R3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setY((double const &)*arg2); + { + try { + (arg1)->setY((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24653,7 +24913,17 @@ SWIGINTERN PyObject *_wrap_R3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setZ((double const &)*arg2); + { + try { + (arg1)->setZ((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24686,7 +24956,17 @@ SWIGINTERN PyObject *_wrap_R3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___iadd__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24719,7 +24999,17 @@ SWIGINTERN PyObject *_wrap_R3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___isub__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24742,7 +25032,17 @@ SWIGINTERN PyObject *_wrap_R3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_conj" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->conj(); + { + try { + result = ((Vec3< double > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24765,7 +25065,17 @@ SWIGINTERN PyObject *_wrap_R3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24788,7 +25098,17 @@ SWIGINTERN PyObject *_wrap_R3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24811,7 +25131,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24834,7 +25164,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24857,7 +25197,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_throw" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24880,7 +25230,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_null" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24903,7 +25263,17 @@ SWIGINTERN PyObject *_wrap_R3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_complex" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->complex(); + { + try { + result = ((Vec3< double > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24926,7 +25296,17 @@ SWIGINTERN PyObject *_wrap_R3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_real" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->real(); + { + try { + result = ((Vec3< double > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24959,7 +25339,17 @@ SWIGINTERN PyObject *_wrap_R3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___eq__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -24994,7 +25384,17 @@ SWIGINTERN PyObject *_wrap_R3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___ne__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25026,7 +25426,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25056,7 +25466,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25078,7 +25498,17 @@ SWIGINTERN PyObject *_wrap_delete_R3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_R3" "', argument " "1"" of type '" "Vec3< double > *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25126,7 +25556,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_C3" "', argument " "3"" of type '" "std::complex< double >""'"); } arg3 = static_cast< std::complex< double > >(val3); - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25139,7 +25579,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< std::complex< double > > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25205,7 +25655,17 @@ SWIGINTERN PyObject *_wrap_C3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_x" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->x(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25228,7 +25688,17 @@ SWIGINTERN PyObject *_wrap_C3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_y" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->y(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25251,7 +25721,17 @@ SWIGINTERN PyObject *_wrap_C3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_z" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->z(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25282,7 +25762,17 @@ SWIGINTERN PyObject *_wrap_C3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setX((std::complex< double > const &)*arg2); + { + try { + (arg1)->setX((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25313,7 +25803,17 @@ SWIGINTERN PyObject *_wrap_C3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setY((std::complex< double > const &)*arg2); + { + try { + (arg1)->setY((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25344,7 +25844,17 @@ SWIGINTERN PyObject *_wrap_C3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setZ((std::complex< double > const &)*arg2); + { + try { + (arg1)->setZ((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25377,7 +25887,17 @@ SWIGINTERN PyObject *_wrap_C3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___iadd__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25410,7 +25930,17 @@ SWIGINTERN PyObject *_wrap_C3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___isub__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25433,7 +25963,17 @@ SWIGINTERN PyObject *_wrap_C3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_conj" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25456,7 +25996,17 @@ SWIGINTERN PyObject *_wrap_C3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25479,7 +26029,17 @@ SWIGINTERN PyObject *_wrap_C3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25502,7 +26062,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25525,7 +26095,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25548,7 +26128,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_throw" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25571,7 +26161,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_null" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25594,7 +26194,17 @@ SWIGINTERN PyObject *_wrap_C3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_complex" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25617,7 +26227,17 @@ SWIGINTERN PyObject *_wrap_C3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_real" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->real(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25650,7 +26270,17 @@ SWIGINTERN PyObject *_wrap_C3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___eq__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25685,7 +26315,17 @@ SWIGINTERN PyObject *_wrap_C3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___ne__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25717,7 +26357,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25747,7 +26397,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25769,7 +26429,17 @@ SWIGINTERN PyObject *_wrap_delete_C3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_C3" "', argument " "1"" of type '" "Vec3< std::complex< double > > *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25805,7 +26475,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_iterator(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_iterator" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_Vec3_Sl_double_Sg__Sg__iterator(arg1,arg2); + { + try { + result = (swig::SwigPyIterator *)std_vector_Sl_Vec3_Sl_double_Sg__Sg__iterator(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25828,7 +26508,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___nonzero__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___nonzero__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____nonzero__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____nonzero__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25851,7 +26541,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___bool__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___bool__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____bool__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____bool__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25874,7 +26574,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___len__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___len__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg____len__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg____len__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -25912,12 +26622,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___getslice__(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___getslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -25954,12 +26674,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setslice____SWIG_0(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___setslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26009,12 +26739,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setslice____SWIG_1(PyObject *self, Py_ssi } arg4 = ptr; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg4); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; @@ -26116,12 +26856,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delslice__(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___delslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26150,12 +26900,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delitem____SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3___delitem__" "', argument " "2"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::difference_type >(val2); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26184,12 +26944,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___getitem____SWIG_0(PyObject *self, Py_ssiz } arg2 = (PySliceObject *) swig_obj[1]; } - try { - result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26230,12 +27000,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_0(PyObject *self, Py_ssiz } arg3 = ptr; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; @@ -26265,12 +27045,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_1(PyObject *self, Py_ssiz } arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26298,12 +27088,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delitem____SWIG_1(PyObject *self, Py_ssiz } arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26378,10 +27178,20 @@ SWIGINTERN PyObject *_wrap_vector_R3___getitem____SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3___getitem__" "', argument " "2"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::difference_type >(val2); - try { - result = (std::vector< Vec3< double > >::value_type *) &std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< Vec3< double > > const *)arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double > >::value_type *) &std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< Vec3< double > > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); @@ -26467,10 +27277,20 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_2(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3___setitem__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26561,10 +27381,20 @@ SWIGINTERN PyObject *_wrap_vector_R3_pop(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_pop" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - try { - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj((new std::vector< Vec3< double > >::value_type(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26597,7 +27427,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_append(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_append" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - std_vector_Sl_Vec3_Sl_double_Sg__Sg__append(arg1,(Vec3< double > const &)*arg2); + { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg__append(arg1,(Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26610,7 +27450,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_0(PyObject *self, Py_ssize_t nobj std::vector< Vec3< double > > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26636,7 +27486,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_1(PyObject *self, Py_ssize_t nobj } arg1 = ptr; } - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >((std::vector< Vec3< double > > const &)*arg1); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >((std::vector< Vec3< double > > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -26661,7 +27521,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_empty(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_empty" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)((std::vector< Vec3< double > > const *)arg1)->empty(); + { + try { + result = (bool)((std::vector< Vec3< double > > const *)arg1)->empty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26684,7 +27554,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_size(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_size" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->size(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26716,7 +27596,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_swap(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_swap" "', argument " "2"" of type '" "std::vector< Vec3< double > > &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > > * >(argp2); - (arg1)->swap(*arg2); + { + try { + (arg1)->swap(*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26739,7 +27629,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_begin(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_begin" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->begin(); + { + try { + result = (arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26763,7 +27663,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_end(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_end" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->end(); + { + try { + result = (arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26787,7 +27697,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_rbegin(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_rbegin" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->rbegin(); + { + try { + result = (arg1)->rbegin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26811,7 +27731,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_rend(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_rend" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->rend(); + { + try { + result = (arg1)->rend(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26834,7 +27764,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_clear(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_clear" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - (arg1)->clear(); + { + try { + (arg1)->clear(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26857,7 +27797,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_get_allocator(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_get_allocator" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->get_allocator(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->get_allocator(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< Vec3< double > >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26878,7 +27828,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_2(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_R3" "', argument " "1"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg1 = static_cast< std::vector< Vec3< double > >::size_type >(val1); - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26900,7 +27860,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_pop_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_pop_back" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - (arg1)->pop_back(); + { + try { + (arg1)->pop_back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26928,7 +27898,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_resize__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3_resize" "', argument " "2"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::size_type >(val2); - (arg1)->resize(arg2); + { + try { + (arg1)->resize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26963,7 +27943,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_erase__SWIG_0(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3_erase" "', argument " "2"" of type '" "std::vector< Vec3< double > >::iterator""'"); } } - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27013,7 +28003,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_erase__SWIG_1(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3_erase" "', argument " "3"" of type '" "std::vector< Vec3< double > >::iterator""'"); } } - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27095,7 +28095,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_3(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vector_R3" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1,(std::vector< Vec3< double > >::value_type const &)*arg2); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1,(std::vector< Vec3< double > >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27182,7 +28192,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_push_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_push_back" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - (arg1)->push_back((std::vector< Vec3< double > >::value_type const &)*arg2); + { + try { + (arg1)->push_back((std::vector< Vec3< double > >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27205,7 +28225,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_front(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_front" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->front(); + { + try { + result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->front(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -27229,7 +28259,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_back" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->back(); + { + try { + result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -27270,7 +28310,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_assign(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_assign" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - (arg1)->assign(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + { + try { + (arg1)->assign(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27309,7 +28359,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_resize__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_resize" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - (arg1)->resize(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + { + try { + (arg1)->resize(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27405,7 +28465,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_insert__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_insert" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27459,7 +28529,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_insert__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_insert" "', argument " "4"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg4 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp4); - std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(Vec3< double > const &)*arg4); + { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(Vec3< double > const &)*arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27546,7 +28626,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_reserve(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3_reserve" "', argument " "2"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::size_type >(val2); - (arg1)->reserve(arg2); + { + try { + (arg1)->reserve(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27569,7 +28659,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_capacity(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_capacity" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->capacity(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->capacity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -27591,7 +28691,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_R3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_R3" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27640,7 +28750,17 @@ SWIGINTERN PyObject *_wrap_generateZValues(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "generateZValues" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = swigAPI::generateZValues(arg1,arg2,arg3); + { + try { + result = swigAPI::generateZValues(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -27689,7 +28809,17 @@ SWIGINTERN PyObject *_wrap_materialProfileSLD(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "materialProfileSLD" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = swigAPI::materialProfileSLD((MultiLayer const &)*arg1,arg2,arg3,arg4); + { + try { + result = swigAPI::materialProfileSLD((MultiLayer const &)*arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< std::complex< double >,std::allocator< std::complex< double > > > >(result)); return resultobj; fail: @@ -27748,7 +28878,17 @@ SWIGINTERN PyObject *_wrap_magnetizationProfile(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "magnetizationProfile" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - result = swigAPI::magnetizationProfile((MultiLayer const &)*arg1,SWIG_STD_MOVE(arg2),arg3,arg4,arg5); + { + try { + result = swigAPI::magnetizationProfile((MultiLayer const &)*arg1,SWIG_STD_MOVE(arg2),arg3,arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -27774,7 +28914,17 @@ SWIGINTERN PyObject *_wrap_defaultMaterialProfileLimits(PyObject *self, PyObject SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "defaultMaterialProfileLimits" "', argument " "1"" of type '" "MultiLayer const &""'"); } arg1 = reinterpret_cast< MultiLayer * >(argp1); - result = swigAPI::defaultMaterialProfileLimits((MultiLayer const &)*arg1); + { + try { + result = swigAPI::defaultMaterialProfileLimits((MultiLayer const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::pair< double,double > >(result)); return resultobj; fail: diff --git a/auto/Wrap/libBornAgainSample.py b/auto/Wrap/libBornAgainSample.py index 0d6bc8c80fc38f0f9ce07d6d35cea2ef05be0b8a..373fba1a4f57504f77798c75b8c4ce4eb2ba94a7 100644 --- a/auto/Wrap/libBornAgainSample.py +++ b/auto/Wrap/libBornAgainSample.py @@ -195,21 +195,21 @@ class vdouble1d_t(object): def __delitem__(self, *args): r""" __delitem__(vdouble1d_t self, std::vector< double >::difference_type i) - __delitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vdouble1d_t self, PySliceObject * slice) """ return _libBornAgainSample.vdouble1d_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble1d_t + __getitem__(vdouble1d_t self, PySliceObject * slice) -> vdouble1d_t __getitem__(vdouble1d_t self, std::vector< double >::difference_type i) -> std::vector< double >::value_type const & """ return _libBornAgainSample.vdouble1d_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice, vdouble1d_t v) - __setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vdouble1d_t self, PySliceObject * slice, vdouble1d_t v) + __setitem__(vdouble1d_t self, PySliceObject * slice) __setitem__(vdouble1d_t self, std::vector< double >::difference_type i, std::vector< double >::value_type const & x) """ return _libBornAgainSample.vdouble1d_t___setitem__(self, *args) @@ -361,21 +361,21 @@ class vdouble2d_t(object): def __delitem__(self, *args): r""" __delitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i) - __delitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vdouble2d_t self, PySliceObject * slice) """ return _libBornAgainSample.vdouble2d_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble2d_t + __getitem__(vdouble2d_t self, PySliceObject * slice) -> vdouble2d_t __getitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i) -> vdouble1d_t """ return _libBornAgainSample.vdouble2d_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice, vdouble2d_t v) - __setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vdouble2d_t self, PySliceObject * slice, vdouble2d_t v) + __setitem__(vdouble2d_t self, PySliceObject * slice) __setitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i, vdouble1d_t x) """ return _libBornAgainSample.vdouble2d_t___setitem__(self, *args) @@ -527,21 +527,21 @@ class vector_integer_t(object): def __delitem__(self, *args): r""" __delitem__(vector_integer_t self, std::vector< int >::difference_type i) - __delitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_integer_t self, PySliceObject * slice) """ return _libBornAgainSample.vector_integer_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) -> vector_integer_t + __getitem__(vector_integer_t self, PySliceObject * slice) -> vector_integer_t __getitem__(vector_integer_t self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const & """ return _libBornAgainSample.vector_integer_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice, vector_integer_t v) - __setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_integer_t self, PySliceObject * slice, vector_integer_t v) + __setitem__(vector_integer_t self, PySliceObject * slice) __setitem__(vector_integer_t self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x) """ return _libBornAgainSample.vector_integer_t___setitem__(self, *args) @@ -693,21 +693,21 @@ class vinteger2d_t(object): def __delitem__(self, *args): r""" __delitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i) - __delitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vinteger2d_t self, PySliceObject * slice) """ return _libBornAgainSample.vinteger2d_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) -> vinteger2d_t + __getitem__(vinteger2d_t self, PySliceObject * slice) -> vinteger2d_t __getitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i) -> vector_integer_t """ return _libBornAgainSample.vinteger2d_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice, vinteger2d_t v) - __setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vinteger2d_t self, PySliceObject * slice, vinteger2d_t v) + __setitem__(vinteger2d_t self, PySliceObject * slice) __setitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i, vector_integer_t x) """ return _libBornAgainSample.vinteger2d_t___setitem__(self, *args) @@ -859,21 +859,21 @@ class vector_longinteger_t(object): def __delitem__(self, *args): r""" __delitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i) - __delitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_longinteger_t self, PySliceObject * slice) """ return _libBornAgainSample.vector_longinteger_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) -> vector_longinteger_t + __getitem__(vector_longinteger_t self, PySliceObject * slice) -> vector_longinteger_t __getitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i) -> std::vector< unsigned long >::value_type const & """ return _libBornAgainSample.vector_longinteger_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice, vector_longinteger_t v) - __setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_longinteger_t self, PySliceObject * slice, vector_longinteger_t v) + __setitem__(vector_longinteger_t self, PySliceObject * slice) __setitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i, std::vector< unsigned long >::value_type const & x) """ return _libBornAgainSample.vector_longinteger_t___setitem__(self, *args) @@ -1025,21 +1025,21 @@ class vector_complex_t(object): def __delitem__(self, *args): r""" __delitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i) - __delitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_complex_t self, PySliceObject * slice) """ return _libBornAgainSample.vector_complex_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) -> vector_complex_t + __getitem__(vector_complex_t self, PySliceObject * slice) -> vector_complex_t __getitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i) -> std::vector< std::complex< double > >::value_type const & """ return _libBornAgainSample.vector_complex_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice, vector_complex_t v) - __setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_complex_t self, PySliceObject * slice, vector_complex_t v) + __setitem__(vector_complex_t self, PySliceObject * slice) __setitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i, std::vector< std::complex< double > >::value_type const & x) """ return _libBornAgainSample.vector_complex_t___setitem__(self, *args) @@ -1191,21 +1191,21 @@ class vector_string_t(object): def __delitem__(self, *args): r""" __delitem__(vector_string_t self, std::vector< std::string >::difference_type i) - __delitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_string_t self, PySliceObject * slice) """ return _libBornAgainSample.vector_string_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) -> vector_string_t + __getitem__(vector_string_t self, PySliceObject * slice) -> vector_string_t __getitem__(vector_string_t self, std::vector< std::string >::difference_type i) -> std::vector< std::string >::value_type const & """ return _libBornAgainSample.vector_string_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice, vector_string_t v) - __setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_string_t self, PySliceObject * slice, vector_string_t v) + __setitem__(vector_string_t self, PySliceObject * slice) __setitem__(vector_string_t self, std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const & x) """ return _libBornAgainSample.vector_string_t___setitem__(self, *args) @@ -1540,21 +1540,21 @@ class vector_pvacuum_double_t(object): def __delitem__(self, *args): r""" __delitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i) - __delitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_pvacuum_double_t self, PySliceObject * slice) """ return _libBornAgainSample.vector_pvacuum_double_t___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) -> vector_pvacuum_double_t + __getitem__(vector_pvacuum_double_t self, PySliceObject * slice) -> vector_pvacuum_double_t __getitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i) -> pvacuum_double_t """ return _libBornAgainSample.vector_pvacuum_double_t___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice, vector_pvacuum_double_t v) - __setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_pvacuum_double_t self, PySliceObject * slice, vector_pvacuum_double_t v) + __setitem__(vector_pvacuum_double_t self, PySliceObject * slice) __setitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i, pvacuum_double_t x) """ return _libBornAgainSample.vector_pvacuum_double_t___setitem__(self, *args) @@ -1907,21 +1907,21 @@ class vector_R3(object): def __delitem__(self, *args): r""" __delitem__(vector_R3 self, std::vector< Vec3< double > >::difference_type i) - __delitem__(vector_R3 self, SWIGPY_SLICEOBJECT * slice) + __delitem__(vector_R3 self, PySliceObject * slice) """ return _libBornAgainSample.vector_R3___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(vector_R3 self, SWIGPY_SLICEOBJECT * slice) -> vector_R3 + __getitem__(vector_R3 self, PySliceObject * slice) -> vector_R3 __getitem__(vector_R3 self, std::vector< Vec3< double > >::difference_type i) -> R3 """ return _libBornAgainSample.vector_R3___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(vector_R3 self, SWIGPY_SLICEOBJECT * slice, vector_R3 v) - __setitem__(vector_R3 self, SWIGPY_SLICEOBJECT * slice) + __setitem__(vector_R3 self, PySliceObject * slice, vector_R3 v) + __setitem__(vector_R3 self, PySliceObject * slice) __setitem__(vector_R3 self, std::vector< Vec3< double > >::difference_type i, R3 x) """ return _libBornAgainSample.vector_R3___setitem__(self, *args) @@ -2074,21 +2074,21 @@ class swig_dummy_type_const_inode_vector(object): def __delitem__(self, *args): r""" __delitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i) - __delitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice) + __delitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice) """ return _libBornAgainSample.swig_dummy_type_const_inode_vector___delitem__(self, *args) def __getitem__(self, *args): r""" - __getitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice) -> swig_dummy_type_const_inode_vector + __getitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice) -> swig_dummy_type_const_inode_vector __getitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i) -> INode """ return _libBornAgainSample.swig_dummy_type_const_inode_vector___getitem__(self, *args) def __setitem__(self, *args): r""" - __setitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice, swig_dummy_type_const_inode_vector v) - __setitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice) + __setitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice, swig_dummy_type_const_inode_vector v) + __setitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice) __setitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i, INode x) """ return _libBornAgainSample.swig_dummy_type_const_inode_vector___setitem__(self, *args) diff --git a/auto/Wrap/libBornAgainSample_wrap.cpp b/auto/Wrap/libBornAgainSample_wrap.cpp index f98d01d50bafbec97053135f8461a94902f3bb94..ebfc8aa5c535974d38aa40ee3696d49179e4bf15 100644 --- a/auto/Wrap/libBornAgainSample_wrap.cpp +++ b/auto/Wrap/libBornAgainSample_wrap.cpp @@ -3705,9 +3705,9 @@ namespace swig { #include <iostream> #if PY_VERSION_HEX >= 0x03020000 -# define SWIGPY_SLICEOBJECT PyObject +# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) #else -# define SWIGPY_SLICEOBJECT PySliceObject +# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) #endif @@ -5520,46 +5520,46 @@ SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *sel SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice,std::vector< double,std::allocator< double > > const &v){ +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< double,std::allocator< double > >::difference_type id = i; std::vector< double,std::allocator< double > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5656,46 +5656,46 @@ SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delslice__(std::vec SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5793,46 +5793,46 @@ SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std: SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice,std::vector< int,std::allocator< int > > const &v){ +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< int,std::allocator< int > >::difference_type id = i; std::vector< int,std::allocator< int > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -5894,46 +5894,46 @@ SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delslice__(std::vector SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< int > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &v){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< int > > *self,PySliceObject *slice,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< int > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< int > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< int > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -6015,46 +6015,46 @@ SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delslice__(std::vector< uns SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_0(std::vector< unsigned long > *self,std::vector< unsigned long >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< unsigned long,std::allocator< unsigned long > > *std_vector_Sl_unsigned_SS_long_Sg____getitem____SWIG_0(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< unsigned long,std::allocator< unsigned long > > *std_vector_Sl_unsigned_SS_long_Sg____getitem____SWIG_0(std::vector< unsigned long > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_0(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice,std::vector< unsigned long,std::allocator< unsigned long > > const &v){ +SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_0(std::vector< unsigned long > *self,PySliceObject *slice,std::vector< unsigned long,std::allocator< unsigned long > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_1(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_1(std::vector< unsigned long > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_1(std::vector< unsigned long > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_1(std::vector< unsigned long > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< unsigned long,std::allocator< unsigned long > >::difference_type id = i; std::vector< unsigned long,std::allocator< unsigned long > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -6099,7 +6099,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_ (PyObject *o, std::complex<double>* val) SWIGINTERNINLINE PyObject* -SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/home/svechnikov/Projects/swig-4.1.0/installed/share/swig/4.1.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/ +SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/ const std::complex<double>& @@ -6167,46 +6167,46 @@ SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delslice__(std::ve SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::complex< double >,std::allocator< std::complex< double > > > *std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::complex< double >,std::allocator< std::complex< double > > > *std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::complex< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &v){ +SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::complex< double > > *self,PySliceObject *slice,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::complex< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::complex< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::complex< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i; std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -6491,46 +6491,46 @@ SWIGINTERN void std_vector_Sl_std_string_Sg____delslice__(std::vector< std::stri SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::string,std::allocator< std::string > > const &v){ +SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice,std::vector< std::string,std::allocator< std::string > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::string,std::allocator< std::string > >::difference_type id = i; std::vector< std::string,std::allocator< std::string > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -7020,46 +7020,46 @@ SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delslice__( SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_0(std::vector< std::pair< double,double > > *self,std::vector< std::pair< double,double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____getitem____SWIG_0(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____getitem____SWIG_0(std::vector< std::pair< double,double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_0(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &v){ +SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_0(std::vector< std::pair< double,double > > *self,PySliceObject *slice,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_1(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_1(std::vector< std::pair< double,double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_1(std::vector< std::pair< double,double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_1(std::vector< std::pair< double,double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type id = i; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -7163,46 +7163,46 @@ SWIGINTERN void std_vector_Sl_Vec3_Sl_double_Sg__Sg____delslice__(std::vector< V SWIGINTERN void std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< Vec3< double > > *self,std::vector< Vec3< double > >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< Vec3< double >,std::allocator< Vec3< double > > > *std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< Vec3< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< Vec3< double >,std::allocator< Vec3< double > > > *std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< Vec3< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< Vec3< double >,std::allocator< Vec3< double > > >::difference_type id = i; std::vector< Vec3< double >,std::allocator< Vec3< double > > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< Vec3< double > > *self,SWIGPY_SLICEOBJECT *slice,std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &v){ +SWIGINTERN void std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< Vec3< double > > *self,PySliceObject *slice,std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< Vec3< double >,std::allocator< Vec3< double > > >::difference_type id = i; std::vector< Vec3< double >,std::allocator< Vec3< double > > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< Vec3< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< Vec3< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< Vec3< double >,std::allocator< Vec3< double > > >::difference_type id = i; std::vector< Vec3< double >,std::allocator< Vec3< double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< Vec3< double > > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< Vec3< double > > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< Vec3< double >,std::allocator< Vec3< double > > >::difference_type id = i; std::vector< Vec3< double >,std::allocator< Vec3< double > > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -7272,46 +7272,46 @@ SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____delslice__(std::vector< I SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_0(std::vector< INode const * > *self,std::vector< INode const * >::difference_type i){ swig::erase(self, swig::getpos(self, i)); } -SWIGINTERN std::vector< INode const *,std::allocator< INode const * > > *std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(std::vector< INode const * > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN std::vector< INode const *,std::allocator< INode const * > > *std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(std::vector< INode const * > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return NULL; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< INode const*,std::allocator< INode const * > >::difference_type id = i; std::vector< INode const*,std::allocator< INode const * > >::difference_type jd = j; return swig::getslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(std::vector< INode const * > *self,SWIGPY_SLICEOBJECT *slice,std::vector< INode const *,std::allocator< INode const * > > const &v){ +SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(std::vector< INode const * > *self,PySliceObject *slice,std::vector< INode const *,std::allocator< INode const * > > const &v){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< INode const*,std::allocator< INode const * > >::difference_type id = i; std::vector< INode const*,std::allocator< INode const * > >::difference_type jd = j; swig::setslice(self, id, jd, step, v); } -SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(std::vector< INode const * > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(std::vector< INode const * > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< INode const*,std::allocator< INode const * > >::difference_type id = i; std::vector< INode const*,std::allocator< INode const * > >::difference_type jd = j; swig::delslice(self, id, jd, step); } -SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(std::vector< INode const * > *self,SWIGPY_SLICEOBJECT *slice){ +SWIGINTERN void std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(std::vector< INode const * > *self,PySliceObject *slice){ Py_ssize_t i, j, step; if( !PySlice_Check(slice) ) { SWIG_Error(SWIG_TypeError, "Slice object expected."); return; } - PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); std::vector< INode const*,std::allocator< INode const * > >::difference_type id = i; std::vector< INode const*,std::allocator< INode const * > >::difference_type jd = j; swig::delslice(self, id, jd, step); @@ -9143,7 +9143,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< double,std::allocator< double > > *result = 0 ; @@ -9156,9 +9156,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___getitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getitem____SWIG_0(arg1,arg2); @@ -9177,7 +9177,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< double,std::allocator< double > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -9191,9 +9191,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; @@ -9225,7 +9225,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -9237,9 +9237,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2); @@ -9258,7 +9258,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble1d_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< double > *arg1 = (std::vector< double > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -9270,9 +9270,9 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___delitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< double > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble1d_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_double_Sg____delitem____SWIG_1(arg1,arg2); @@ -9328,7 +9328,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble1d_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< double >::__delitem__(std::vector< double >::difference_type)\n" - " std::vector< double >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< double >::__delitem__(PySliceObject *)\n"); return 0; } @@ -9406,7 +9406,7 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___getitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble1d_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< double >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< double >::__getitem__(PySliceObject *)\n" " std::vector< double >::__getitem__(std::vector< double >::difference_type) const\n"); return 0; } @@ -9516,8 +9516,8 @@ SWIGINTERN PyObject *_wrap_vdouble1d_t___setitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble1d_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< double >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< double,std::allocator< double > > const &)\n" - " std::vector< double >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< double >::__setitem__(PySliceObject *,std::vector< double,std::allocator< double > > const &)\n" + " std::vector< double >::__setitem__(PySliceObject *)\n" " std::vector< double >::__setitem__(std::vector< double >::difference_type,std::vector< double >::value_type const &)\n"); return 0; } @@ -10569,7 +10569,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble1d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble1d_t" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10967,7 +10977,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *result = 0 ; @@ -10980,9 +10990,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___getitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -11001,7 +11011,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -11015,9 +11025,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_0(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; @@ -11049,7 +11059,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -11061,9 +11071,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -11082,7 +11092,7 @@ fail: SWIGINTERN PyObject *_wrap_vdouble2d_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< double > > *arg1 = (std::vector< std::vector< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -11094,9 +11104,9 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___delitem____SWIG_1(PyObject *self, Py_ss arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vdouble2d_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -11152,7 +11162,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble2d_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::vector< double > >::__delitem__(std::vector< std::vector< double > >::difference_type)\n" - " std::vector< std::vector< double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::vector< double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -11230,7 +11240,7 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___getitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble2d_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< double > >::__getitem__(PySliceObject *)\n" " std::vector< std::vector< double > >::__getitem__(std::vector< std::vector< double > >::difference_type) const\n"); return 0; } @@ -11343,8 +11353,8 @@ SWIGINTERN PyObject *_wrap_vdouble2d_t___setitem__(PyObject *self, PyObject *arg fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vdouble2d_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n" - " std::vector< std::vector< double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< double > >::__setitem__(PySliceObject *,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)\n" + " std::vector< std::vector< double > >::__setitem__(PySliceObject *)\n" " std::vector< std::vector< double > >::__setitem__(std::vector< std::vector< double > >::difference_type,std::vector< std::vector< double > >::value_type const &)\n"); return 0; } @@ -12423,7 +12433,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble2d_t" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -12821,7 +12841,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< int,std::allocator< int > > *result = 0 ; @@ -12834,9 +12854,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___getitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2); @@ -12855,7 +12875,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< int,std::allocator< int > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -12869,9 +12889,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; @@ -12903,7 +12923,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -12915,9 +12935,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___setitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2); @@ -12936,7 +12956,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_integer_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -12948,9 +12968,9 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___delitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< int > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_integer_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2); @@ -13006,7 +13026,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_integer_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n" - " std::vector< int >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< int >::__delitem__(PySliceObject *)\n"); return 0; } @@ -13084,7 +13104,7 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___getitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_integer_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< int >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< int >::__getitem__(PySliceObject *)\n" " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n"); return 0; } @@ -13194,8 +13214,8 @@ SWIGINTERN PyObject *_wrap_vector_integer_t___setitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_integer_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< int >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< int,std::allocator< int > > const &)\n" - " std::vector< int >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n" + " std::vector< int >::__setitem__(PySliceObject *)\n" " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n"); return 0; } @@ -14247,7 +14267,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_integer_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_integer_t" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -14645,7 +14675,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *result = 0 ; @@ -14658,9 +14688,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___getitem____SWIG_0(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *)std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -14679,7 +14709,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -14693,9 +14723,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_0(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *ptr = (std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *)0; @@ -14727,7 +14757,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -14739,9 +14769,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem____SWIG_1(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -14760,7 +14790,7 @@ fail: SWIGINTERN PyObject *_wrap_vinteger2d_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::vector< int > > *arg1 = (std::vector< std::vector< int > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -14772,9 +14802,9 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___delitem____SWIG_1(PyObject *self, Py_s arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vinteger2d_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -14830,7 +14860,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vinteger2d_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::vector< int > >::__delitem__(std::vector< std::vector< int > >::difference_type)\n" - " std::vector< std::vector< int > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::vector< int > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -14908,7 +14938,7 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___getitem__(PyObject *self, PyObject *ar fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vinteger2d_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< int > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< int > >::__getitem__(PySliceObject *)\n" " std::vector< std::vector< int > >::__getitem__(std::vector< std::vector< int > >::difference_type) const\n"); return 0; } @@ -15021,8 +15051,8 @@ SWIGINTERN PyObject *_wrap_vinteger2d_t___setitem__(PyObject *self, PyObject *ar fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vinteger2d_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::vector< int > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &)\n" - " std::vector< std::vector< int > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::vector< int > >::__setitem__(PySliceObject *,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &)\n" + " std::vector< std::vector< int > >::__setitem__(PySliceObject *)\n" " std::vector< std::vector< int > >::__setitem__(std::vector< std::vector< int > >::difference_type,std::vector< std::vector< int > >::value_type const &)\n"); return 0; } @@ -16101,7 +16131,17 @@ SWIGINTERN PyObject *_wrap_delete_vinteger2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vinteger2d_t" "', argument " "1"" of type '" "std::vector< std::vector< int > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -16499,7 +16539,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< unsigned long,std::allocator< unsigned long > > *result = 0 ; @@ -16512,9 +16552,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___getitem____SWIG_0(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< unsigned long,std::allocator< unsigned long > > *)std_vector_Sl_unsigned_SS_long_Sg____getitem____SWIG_0(arg1,arg2); @@ -16533,7 +16573,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< unsigned long,std::allocator< unsigned long > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -16547,9 +16587,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_0(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< unsigned long,std::allocator< unsigned long > > *ptr = (std::vector< unsigned long,std::allocator< unsigned long > > *)0; @@ -16581,7 +16621,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -16593,9 +16633,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem____SWIG_1(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_unsigned_SS_long_Sg____setitem____SWIG_1(arg1,arg2); @@ -16614,7 +16654,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_longinteger_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -16626,9 +16666,9 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___delitem____SWIG_1(PyObject *se arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_longinteger_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_unsigned_SS_long_Sg____delitem____SWIG_1(arg1,arg2); @@ -16684,7 +16724,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_longinteger_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< unsigned long >::__delitem__(std::vector< unsigned long >::difference_type)\n" - " std::vector< unsigned long >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< unsigned long >::__delitem__(PySliceObject *)\n"); return 0; } @@ -16762,7 +16802,7 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___getitem__(PyObject *self, PyOb fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_longinteger_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< unsigned long >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< unsigned long >::__getitem__(PySliceObject *)\n" " std::vector< unsigned long >::__getitem__(std::vector< unsigned long >::difference_type) const\n"); return 0; } @@ -16872,8 +16912,8 @@ SWIGINTERN PyObject *_wrap_vector_longinteger_t___setitem__(PyObject *self, PyOb fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_longinteger_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< unsigned long >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< unsigned long,std::allocator< unsigned long > > const &)\n" - " std::vector< unsigned long >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< unsigned long >::__setitem__(PySliceObject *,std::vector< unsigned long,std::allocator< unsigned long > > const &)\n" + " std::vector< unsigned long >::__setitem__(PySliceObject *)\n" " std::vector< unsigned long >::__setitem__(std::vector< unsigned long >::difference_type,std::vector< unsigned long >::value_type const &)\n"); return 0; } @@ -17925,7 +17965,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_longinteger_t(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_longinteger_t" "', argument " "1"" of type '" "std::vector< unsigned long > *""'"); } arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -18323,7 +18373,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::complex< double >,std::allocator< std::complex< double > > > *result = 0 ; @@ -18336,9 +18386,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___getitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -18357,7 +18407,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::complex< double >,std::allocator< std::complex< double > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -18371,9 +18421,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_0(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::complex< double >,std::allocator< std::complex< double > > > *ptr = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)0; @@ -18405,7 +18455,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -18417,9 +18467,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___setitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -18438,7 +18488,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_complex_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -18450,9 +18500,9 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___delitem____SWIG_1(PyObject *self, arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_complex_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -18508,7 +18558,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_complex_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::complex< double > >::__delitem__(std::vector< std::complex< double > >::difference_type)\n" - " std::vector< std::complex< double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::complex< double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -18586,7 +18636,7 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___getitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_complex_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::complex< double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::complex< double > >::__getitem__(PySliceObject *)\n" " std::vector< std::complex< double > >::__getitem__(std::vector< std::complex< double > >::difference_type) const\n"); return 0; } @@ -18696,8 +18746,8 @@ SWIGINTERN PyObject *_wrap_vector_complex_t___setitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_complex_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::complex< double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)\n" - " std::vector< std::complex< double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::complex< double > >::__setitem__(PySliceObject *,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)\n" + " std::vector< std::complex< double > >::__setitem__(PySliceObject *)\n" " std::vector< std::complex< double > >::__setitem__(std::vector< std::complex< double > >::difference_type,std::vector< std::complex< double > >::value_type const &)\n"); return 0; } @@ -19749,7 +19799,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_complex_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_complex_t" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -20147,7 +20207,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::string,std::allocator< std::string > > *result = 0 ; @@ -20160,9 +20220,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___getitem____SWIG_0(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg____getitem____SWIG_0(arg1,arg2); @@ -20181,7 +20241,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::string,std::allocator< std::string > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -20195,9 +20255,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_0(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0; @@ -20229,7 +20289,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -20241,9 +20301,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___setitem____SWIG_1(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_string_Sg____setitem____SWIG_1(arg1,arg2); @@ -20262,7 +20322,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_string_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -20274,9 +20334,9 @@ SWIGINTERN PyObject *_wrap_vector_string_t___delitem____SWIG_1(PyObject *self, P arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_string_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_string_Sg____delitem____SWIG_1(arg1,arg2); @@ -20332,7 +20392,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_string_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::string >::__delitem__(std::vector< std::string >::difference_type)\n" - " std::vector< std::string >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::string >::__delitem__(PySliceObject *)\n"); return 0; } @@ -20410,7 +20470,7 @@ SWIGINTERN PyObject *_wrap_vector_string_t___getitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_string_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::string >::__getitem__(PySliceObject *)\n" " std::vector< std::string >::__getitem__(std::vector< std::string >::difference_type) const\n"); return 0; } @@ -20523,8 +20583,8 @@ SWIGINTERN PyObject *_wrap_vector_string_t___setitem__(PyObject *self, PyObject fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_string_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::string >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::string,std::allocator< std::string > > const &)\n" - " std::vector< std::string >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::string >::__setitem__(PySliceObject *,std::vector< std::string,std::allocator< std::string > > const &)\n" + " std::vector< std::string >::__setitem__(PySliceObject *)\n" " std::vector< std::string >::__setitem__(std::vector< std::string >::difference_type,std::vector< std::string >::value_type const &)\n"); return 0; } @@ -21603,7 +21663,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_string_t(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_string_t" "', argument " "1"" of type '" "std::vector< std::string > *""'"); } arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22812,7 +22882,17 @@ SWIGINTERN PyObject *_wrap_delete_map_string_double_t(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_string_double_t" "', argument " "1"" of type '" "std::map< std::string,double > *""'"); } arg1 = reinterpret_cast< std::map< std::string,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -23065,7 +23145,17 @@ SWIGINTERN PyObject *_wrap_delete_pvacuum_double_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pvacuum_double_t" "', argument " "1"" of type '" "std::pair< double,double > *""'"); } arg1 = reinterpret_cast< std::pair< double,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -23463,7 +23553,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *result = 0 ; @@ -23476,9 +23566,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___getitem____SWIG_0(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { result = (std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *)std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); @@ -23497,7 +23587,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -23511,9 +23601,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_0(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *ptr = (std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > *)0; @@ -23545,7 +23635,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -23557,9 +23647,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem____SWIG_1(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); @@ -23578,7 +23668,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< std::pair< double,double > > *arg1 = (std::vector< std::pair< double,double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -23590,9 +23680,9 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___delitem____SWIG_1(PyObject arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_pvacuum_double_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } try { std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); @@ -23648,7 +23738,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_pvacuum_double_t___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< std::pair< double,double > >::__delitem__(std::vector< std::pair< double,double > >::difference_type)\n" - " std::vector< std::pair< double,double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< std::pair< double,double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -23726,7 +23816,7 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___getitem__(PyObject *self, P fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_pvacuum_double_t___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< double,double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::pair< double,double > >::__getitem__(PySliceObject *)\n" " std::vector< std::pair< double,double > >::__getitem__(std::vector< std::pair< double,double > >::difference_type) const\n"); return 0; } @@ -23839,8 +23929,8 @@ SWIGINTERN PyObject *_wrap_vector_pvacuum_double_t___setitem__(PyObject *self, P fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_pvacuum_double_t___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< std::pair< double,double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &)\n" - " std::vector< std::pair< double,double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< std::pair< double,double > >::__setitem__(PySliceObject *,std::vector< std::pair< double,double >,std::allocator< std::pair< double,double > > > const &)\n" + " std::vector< std::pair< double,double > >::__setitem__(PySliceObject *)\n" " std::vector< std::pair< double,double > >::__setitem__(std::vector< std::pair< double,double > >::difference_type,std::vector< std::pair< double,double > >::value_type const &)\n"); return 0; } @@ -24919,7 +25009,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_pvacuum_double_t(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_pvacuum_double_t" "', argument " "1"" of type '" "std::vector< std::pair< double,double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24967,7 +25067,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_R3" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + { + try { + result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24980,7 +25090,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< double > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< double > *)new Vec3< double >(); + { + try { + result = (Vec3< double > *)new Vec3< double >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25046,7 +25166,17 @@ SWIGINTERN PyObject *_wrap_R3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_x" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->x(); + { + try { + result = (double)((Vec3< double > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25069,7 +25199,17 @@ SWIGINTERN PyObject *_wrap_R3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_y" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->y(); + { + try { + result = (double)((Vec3< double > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25092,7 +25232,17 @@ SWIGINTERN PyObject *_wrap_R3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_z" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->z(); + { + try { + result = (double)((Vec3< double > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25123,7 +25273,17 @@ SWIGINTERN PyObject *_wrap_R3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setX((double const &)*arg2); + { + try { + (arg1)->setX((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25154,7 +25314,17 @@ SWIGINTERN PyObject *_wrap_R3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setY((double const &)*arg2); + { + try { + (arg1)->setY((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25185,7 +25355,17 @@ SWIGINTERN PyObject *_wrap_R3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setZ((double const &)*arg2); + { + try { + (arg1)->setZ((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25218,7 +25398,17 @@ SWIGINTERN PyObject *_wrap_R3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___iadd__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25251,7 +25441,17 @@ SWIGINTERN PyObject *_wrap_R3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___isub__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25274,7 +25474,17 @@ SWIGINTERN PyObject *_wrap_R3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_conj" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->conj(); + { + try { + result = ((Vec3< double > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25297,7 +25507,17 @@ SWIGINTERN PyObject *_wrap_R3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25320,7 +25540,17 @@ SWIGINTERN PyObject *_wrap_R3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25343,7 +25573,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25366,7 +25606,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25389,7 +25639,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_throw" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25412,7 +25672,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_null" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25435,7 +25705,17 @@ SWIGINTERN PyObject *_wrap_R3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_complex" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->complex(); + { + try { + result = ((Vec3< double > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25458,7 +25738,17 @@ SWIGINTERN PyObject *_wrap_R3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_real" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->real(); + { + try { + result = ((Vec3< double > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25491,7 +25781,17 @@ SWIGINTERN PyObject *_wrap_R3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___eq__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25526,7 +25826,17 @@ SWIGINTERN PyObject *_wrap_R3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___ne__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25558,7 +25868,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25588,7 +25908,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25610,7 +25940,17 @@ SWIGINTERN PyObject *_wrap_delete_R3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_R3" "', argument " "1"" of type '" "Vec3< double > *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25658,7 +25998,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_C3" "', argument " "3"" of type '" "std::complex< double >""'"); } arg3 = static_cast< std::complex< double > >(val3); - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25671,7 +26021,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< std::complex< double > > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25737,7 +26097,17 @@ SWIGINTERN PyObject *_wrap_C3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_x" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->x(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25760,7 +26130,17 @@ SWIGINTERN PyObject *_wrap_C3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_y" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->y(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25783,7 +26163,17 @@ SWIGINTERN PyObject *_wrap_C3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_z" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->z(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25814,7 +26204,17 @@ SWIGINTERN PyObject *_wrap_C3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setX((std::complex< double > const &)*arg2); + { + try { + (arg1)->setX((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25845,7 +26245,17 @@ SWIGINTERN PyObject *_wrap_C3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setY((std::complex< double > const &)*arg2); + { + try { + (arg1)->setY((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25876,7 +26286,17 @@ SWIGINTERN PyObject *_wrap_C3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setZ((std::complex< double > const &)*arg2); + { + try { + (arg1)->setZ((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25909,7 +26329,17 @@ SWIGINTERN PyObject *_wrap_C3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___iadd__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25942,7 +26372,17 @@ SWIGINTERN PyObject *_wrap_C3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___isub__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25965,7 +26405,17 @@ SWIGINTERN PyObject *_wrap_C3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_conj" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25988,7 +26438,17 @@ SWIGINTERN PyObject *_wrap_C3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26011,7 +26471,17 @@ SWIGINTERN PyObject *_wrap_C3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26034,7 +26504,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26057,7 +26537,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26080,7 +26570,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_throw" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26103,7 +26603,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_null" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26126,7 +26636,17 @@ SWIGINTERN PyObject *_wrap_C3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_complex" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26149,7 +26669,17 @@ SWIGINTERN PyObject *_wrap_C3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_real" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->real(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26182,7 +26712,17 @@ SWIGINTERN PyObject *_wrap_C3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___eq__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26217,7 +26757,17 @@ SWIGINTERN PyObject *_wrap_C3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___ne__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26249,7 +26799,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26279,7 +26839,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26301,7 +26871,17 @@ SWIGINTERN PyObject *_wrap_delete_C3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_C3" "', argument " "1"" of type '" "Vec3< std::complex< double > > *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26337,7 +26917,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_iterator(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_iterator" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_Vec3_Sl_double_Sg__Sg__iterator(arg1,arg2); + { + try { + result = (swig::SwigPyIterator *)std_vector_Sl_Vec3_Sl_double_Sg__Sg__iterator(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -26360,7 +26950,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___nonzero__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___nonzero__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____nonzero__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____nonzero__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26383,7 +26983,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___bool__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___bool__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____bool__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____bool__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26406,7 +27016,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___len__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___len__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg____len__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg____len__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26444,12 +27064,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___getslice__(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___getslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26486,12 +27116,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setslice____SWIG_0(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___setslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26541,12 +27181,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setslice____SWIG_1(PyObject *self, Py_ssi } arg4 = ptr; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg4); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; @@ -26648,12 +27298,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delslice__(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___delslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26682,12 +27342,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delitem____SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3___delitem__" "', argument " "2"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::difference_type >(val2); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26699,7 +27369,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_R3___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< Vec3< double > > *arg1 = (std::vector< Vec3< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< Vec3< double >,std::allocator< Vec3< double > > > *result = 0 ; @@ -26712,16 +27382,26 @@ SWIGINTERN PyObject *_wrap_vector_R3___getitem____SWIG_0(PyObject *self, Py_ssiz arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26733,7 +27413,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< Vec3< double > > *arg1 = (std::vector< Vec3< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< Vec3< double >,std::allocator< Vec3< double > > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -26747,9 +27427,9 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_0(PyObject *self, Py_ssiz arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< Vec3< double >,std::allocator< Vec3< double > > > *ptr = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)0; @@ -26762,12 +27442,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_0(PyObject *self, Py_ssiz } arg3 = ptr; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; @@ -26781,7 +27471,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< Vec3< double > > *arg1 = (std::vector< Vec3< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -26793,16 +27483,26 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_1(PyObject *self, Py_ssiz arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26814,7 +27514,7 @@ fail: SWIGINTERN PyObject *_wrap_vector_R3___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< Vec3< double > > *arg1 = (std::vector< Vec3< double > > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -26826,16 +27526,26 @@ SWIGINTERN PyObject *_wrap_vector_R3___delitem____SWIG_1(PyObject *self, Py_ssiz arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26884,7 +27594,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_R3___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< Vec3< double > >::__delitem__(std::vector< Vec3< double > >::difference_type)\n" - " std::vector< Vec3< double > >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< Vec3< double > >::__delitem__(PySliceObject *)\n"); return 0; } @@ -26910,10 +27620,20 @@ SWIGINTERN PyObject *_wrap_vector_R3___getitem____SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3___getitem__" "', argument " "2"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::difference_type >(val2); - try { - result = (std::vector< Vec3< double > >::value_type *) &std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< Vec3< double > > const *)arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double > >::value_type *) &std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< Vec3< double > > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); @@ -26962,7 +27682,7 @@ SWIGINTERN PyObject *_wrap_vector_R3___getitem__(PyObject *self, PyObject *args) fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_R3___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< Vec3< double > >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< Vec3< double > >::__getitem__(PySliceObject *)\n" " std::vector< Vec3< double > >::__getitem__(std::vector< Vec3< double > >::difference_type) const\n"); return 0; } @@ -26999,10 +27719,20 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_2(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3___setitem__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -27071,8 +27801,8 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem__(PyObject *self, PyObject *args) fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_R3___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< Vec3< double > >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)\n" - " std::vector< Vec3< double > >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< Vec3< double > >::__setitem__(PySliceObject *,std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)\n" + " std::vector< Vec3< double > >::__setitem__(PySliceObject *)\n" " std::vector< Vec3< double > >::__setitem__(std::vector< Vec3< double > >::difference_type,std::vector< Vec3< double > >::value_type const &)\n"); return 0; } @@ -27093,10 +27823,20 @@ SWIGINTERN PyObject *_wrap_vector_R3_pop(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_pop" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - try { - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj((new std::vector< Vec3< double > >::value_type(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -27129,7 +27869,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_append(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_append" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - std_vector_Sl_Vec3_Sl_double_Sg__Sg__append(arg1,(Vec3< double > const &)*arg2); + { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg__append(arg1,(Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27142,7 +27892,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_0(PyObject *self, Py_ssize_t nobj std::vector< Vec3< double > > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27168,7 +27928,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_1(PyObject *self, Py_ssize_t nobj } arg1 = ptr; } - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >((std::vector< Vec3< double > > const &)*arg1); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >((std::vector< Vec3< double > > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -27193,7 +27963,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_empty(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_empty" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)((std::vector< Vec3< double > > const *)arg1)->empty(); + { + try { + result = (bool)((std::vector< Vec3< double > > const *)arg1)->empty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -27216,7 +27996,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_size(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_size" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->size(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -27248,7 +28038,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_swap(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_swap" "', argument " "2"" of type '" "std::vector< Vec3< double > > &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > > * >(argp2); - (arg1)->swap(*arg2); + { + try { + (arg1)->swap(*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27271,7 +28071,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_begin(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_begin" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->begin(); + { + try { + result = (arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27295,7 +28105,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_end(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_end" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->end(); + { + try { + result = (arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27319,7 +28139,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_rbegin(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_rbegin" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->rbegin(); + { + try { + result = (arg1)->rbegin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27343,7 +28173,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_rend(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_rend" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->rend(); + { + try { + result = (arg1)->rend(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27366,7 +28206,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_clear(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_clear" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - (arg1)->clear(); + { + try { + (arg1)->clear(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27389,7 +28239,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_get_allocator(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_get_allocator" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->get_allocator(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->get_allocator(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< Vec3< double > >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27410,7 +28270,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_2(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_R3" "', argument " "1"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg1 = static_cast< std::vector< Vec3< double > >::size_type >(val1); - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27432,7 +28302,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_pop_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_pop_back" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - (arg1)->pop_back(); + { + try { + (arg1)->pop_back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27460,7 +28340,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_resize__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3_resize" "', argument " "2"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::size_type >(val2); - (arg1)->resize(arg2); + { + try { + (arg1)->resize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27495,7 +28385,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_erase__SWIG_0(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3_erase" "', argument " "2"" of type '" "std::vector< Vec3< double > >::iterator""'"); } } - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27545,7 +28445,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_erase__SWIG_1(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3_erase" "', argument " "3"" of type '" "std::vector< Vec3< double > >::iterator""'"); } } - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27627,7 +28537,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_3(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vector_R3" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1,(std::vector< Vec3< double > >::value_type const &)*arg2); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1,(std::vector< Vec3< double > >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27714,7 +28634,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_push_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_push_back" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - (arg1)->push_back((std::vector< Vec3< double > >::value_type const &)*arg2); + { + try { + (arg1)->push_back((std::vector< Vec3< double > >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27737,7 +28667,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_front(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_front" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->front(); + { + try { + result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->front(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -27761,7 +28701,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_back" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->back(); + { + try { + result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -27802,7 +28752,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_assign(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_assign" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - (arg1)->assign(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + { + try { + (arg1)->assign(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27841,7 +28801,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_resize__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_resize" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - (arg1)->resize(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + { + try { + (arg1)->resize(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27937,7 +28907,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_insert__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_insert" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27991,7 +28971,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_insert__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_insert" "', argument " "4"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg4 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp4); - std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(Vec3< double > const &)*arg4); + { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(Vec3< double > const &)*arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28078,7 +29068,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_reserve(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3_reserve" "', argument " "2"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::size_type >(val2); - (arg1)->reserve(arg2); + { + try { + (arg1)->reserve(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28101,7 +29101,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_capacity(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_capacity" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->capacity(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->capacity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -28123,7 +29133,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_R3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_R3" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28159,7 +29179,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_iterator(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_iterator" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_INode_SS_const_Sm__Sg__iterator(arg1,arg2); + { + try { + result = (swig::SwigPyIterator *)std_vector_Sl_INode_SS_const_Sm__Sg__iterator(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -28182,7 +29212,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___nonzero__(PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector___nonzero__" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____nonzero__((std::vector< INode const * > const *)arg1); + { + try { + result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____nonzero__((std::vector< INode const * > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -28205,7 +29245,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___bool__(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector___bool__" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____bool__((std::vector< INode const * > const *)arg1); + { + try { + result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____bool__((std::vector< INode const * > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -28228,7 +29278,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___len__(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector___len__" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = std_vector_Sl_INode_SS_const_Sm__Sg____len__((std::vector< INode const * > const *)arg1); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg____len__((std::vector< INode const * > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -28266,12 +29326,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getslice__(PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "swig_dummy_type_const_inode_vector___getslice__" "', argument " "3"" of type '" "std::vector< INode const * >::difference_type""'"); } arg3 = static_cast< std::vector< INode const * >::difference_type >(val3); - try { - result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -28308,12 +29378,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setslice____SWIG SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "swig_dummy_type_const_inode_vector___setslice__" "', argument " "3"" of type '" "std::vector< INode const * >::difference_type""'"); } arg3 = static_cast< std::vector< INode const * >::difference_type >(val3); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28363,12 +29443,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setslice____SWIG } arg4 = ptr; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< INode const *,std::allocator< INode const * > > const &)*arg4); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< INode const *,std::allocator< INode const * > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; @@ -28470,12 +29560,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delslice__(PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "swig_dummy_type_const_inode_vector___delslice__" "', argument " "3"" of type '" "std::vector< INode const * >::difference_type""'"); } arg3 = static_cast< std::vector< INode const * >::difference_type >(val3); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28504,12 +29604,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delitem____SWIG_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector___delitem__" "', argument " "2"" of type '" "std::vector< INode const * >::difference_type""'"); } arg2 = static_cast< std::vector< INode const * >::difference_type >(val2); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28521,7 +29631,7 @@ fail: SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< INode const * > *arg1 = (std::vector< INode const * > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::vector< INode const *,std::allocator< INode const * > > *result = 0 ; @@ -28534,16 +29644,26 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem____SWIG_ arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -28555,7 +29675,7 @@ fail: SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< INode const * > *arg1 = (std::vector< INode const * > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; std::vector< INode const *,std::allocator< INode const * > > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -28569,9 +29689,9 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } { std::vector< INode const*,std::allocator< INode const * > > *ptr = (std::vector< INode const*,std::allocator< INode const * > > *)0; @@ -28584,12 +29704,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ } arg3 = ptr; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< INode const *,std::allocator< INode const * > > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< INode const *,std::allocator< INode const * > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; @@ -28603,7 +29733,7 @@ fail: SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< INode const * > *arg1 = (std::vector< INode const * > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -28615,16 +29745,26 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28636,7 +29776,7 @@ fail: SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::vector< INode const * > *arg1 = (std::vector< INode const * > *) 0 ; - SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -28648,16 +29788,26 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delitem____SWIG_ arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); { if (!PySlice_Check(swig_obj[1])) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); } - arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28706,7 +29856,7 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'swig_dummy_type_const_inode_vector___delitem__'.\n" " Possible C/C++ prototypes are:\n" " std::vector< INode const * >::__delitem__(std::vector< INode const * >::difference_type)\n" - " std::vector< INode const * >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + " std::vector< INode const * >::__delitem__(PySliceObject *)\n"); return 0; } @@ -28732,10 +29882,20 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem____SWIG_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector___getitem__" "', argument " "2"" of type '" "std::vector< INode const * >::difference_type""'"); } arg2 = static_cast< std::vector< INode const * >::difference_type >(val2); - try { - result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_1(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_1(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; @@ -28783,7 +29943,7 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem__(PyObje fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'swig_dummy_type_const_inode_vector___getitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< INode const * >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< INode const * >::__getitem__(PySliceObject *)\n" " std::vector< INode const * >::__getitem__(std::vector< INode const * >::difference_type)\n"); return 0; } @@ -28817,10 +29977,20 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28890,8 +30060,8 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem__(PyObje fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'swig_dummy_type_const_inode_vector___setitem__'.\n" " Possible C/C++ prototypes are:\n" - " std::vector< INode const * >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< INode const *,std::allocator< INode const * > > const &)\n" - " std::vector< INode const * >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< INode const * >::__setitem__(PySliceObject *,std::vector< INode const *,std::allocator< INode const * > > const &)\n" + " std::vector< INode const * >::__setitem__(PySliceObject *)\n" " std::vector< INode const * >::__setitem__(std::vector< INode const * >::difference_type,std::vector< INode const * >::value_type)\n"); return 0; } @@ -28912,10 +30082,20 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_pop(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_pop" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - try { - result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; @@ -28945,7 +30125,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_append(PyObject *s SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "swig_dummy_type_const_inode_vector_append" "', argument " "2"" of type '" "std::vector< INode const * >::value_type""'"); } arg2 = reinterpret_cast< std::vector< INode const * >::value_type >(argp2); - std_vector_Sl_INode_SS_const_Sm__Sg__append(arg1,(INode const *)arg2); + { + try { + std_vector_Sl_INode_SS_const_Sm__Sg__append(arg1,(INode const *)arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28958,7 +30148,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_0(PyObje std::vector< INode const * > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< INode const * > *)new std::vector< INode const * >(); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -28984,7 +30184,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_1(PyObje } arg1 = ptr; } - result = (std::vector< INode const * > *)new std::vector< INode const * >((std::vector< INode const * > const &)*arg1); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >((std::vector< INode const * > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -29009,7 +30219,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_empty(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_empty" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (bool)((std::vector< INode const * > const *)arg1)->empty(); + { + try { + result = (bool)((std::vector< INode const * > const *)arg1)->empty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -29032,7 +30252,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_size(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_size" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = ((std::vector< INode const * > const *)arg1)->size(); + { + try { + result = ((std::vector< INode const * > const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -29064,7 +30294,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_swap(PyObject *sel SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "swig_dummy_type_const_inode_vector_swap" "', argument " "2"" of type '" "std::vector< INode const * > &""'"); } arg2 = reinterpret_cast< std::vector< INode const * > * >(argp2); - (arg1)->swap(*arg2); + { + try { + (arg1)->swap(*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29087,7 +30327,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_begin(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_begin" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->begin(); + { + try { + result = (arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -29111,7 +30361,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_end(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_end" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->end(); + { + try { + result = (arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -29135,7 +30395,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_rbegin(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_rbegin" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->rbegin(); + { + try { + result = (arg1)->rbegin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -29159,7 +30429,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_rend(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_rend" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->rend(); + { + try { + result = (arg1)->rend(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -29182,7 +30462,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_clear(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_clear" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - (arg1)->clear(); + { + try { + (arg1)->clear(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29205,7 +30495,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_get_allocator(PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_get_allocator" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = ((std::vector< INode const * > const *)arg1)->get_allocator(); + { + try { + result = ((std::vector< INode const * > const *)arg1)->get_allocator(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< INode const * >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_INode_const_p_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -29226,7 +30526,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_2(PyObje SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_swig_dummy_type_const_inode_vector" "', argument " "1"" of type '" "std::vector< INode const * >::size_type""'"); } arg1 = static_cast< std::vector< INode const * >::size_type >(val1); - result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29248,7 +30558,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_pop_back(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_pop_back" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - (arg1)->pop_back(); + { + try { + (arg1)->pop_back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29276,7 +30596,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_resize__SWIG_0(PyO SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector_resize" "', argument " "2"" of type '" "std::vector< INode const * >::size_type""'"); } arg2 = static_cast< std::vector< INode const * >::size_type >(val2); - (arg1)->resize(arg2); + { + try { + (arg1)->resize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29311,7 +30641,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_erase__SWIG_0(PyOb SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector_erase" "', argument " "2"" of type '" "std::vector< INode const * >::iterator""'"); } } - result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -29361,7 +30701,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_erase__SWIG_1(PyOb SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector_erase" "', argument " "3"" of type '" "std::vector< INode const * >::iterator""'"); } } - result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -29440,7 +30790,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_3(PyObje SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_swig_dummy_type_const_inode_vector" "', argument " "2"" of type '" "std::vector< INode const * >::value_type""'"); } arg2 = reinterpret_cast< std::vector< INode const * >::value_type >(argp2); - result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1,arg2); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29525,7 +30885,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_push_back(PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "swig_dummy_type_const_inode_vector_push_back" "', argument " "2"" of type '" "std::vector< INode const * >::value_type""'"); } arg2 = reinterpret_cast< std::vector< INode const * >::value_type >(argp2); - (arg1)->push_back(arg2); + { + try { + (arg1)->push_back(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29548,7 +30918,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_front(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_front" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->front(); + { + try { + result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->front(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; fail: @@ -29571,7 +30951,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_back(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_back" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->back(); + { + try { + result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; fail: @@ -29608,7 +30998,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_assign(PyObject *s SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector_assign" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - (arg1)->assign(arg2,arg3); + { + try { + (arg1)->assign(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29644,7 +31044,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_resize__SWIG_1(PyO SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector_resize" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - (arg1)->resize(arg2,arg3); + { + try { + (arg1)->resize(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29738,7 +31148,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_insert__SWIG_0(PyO SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector_insert" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - result = std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -29789,7 +31209,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_insert__SWIG_1(PyO SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "swig_dummy_type_const_inode_vector_insert" "', argument " "4"" of type '" "std::vector< INode const * >::value_type""'"); } arg4 = reinterpret_cast< std::vector< INode const * >::value_type >(argp4); - std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(INode const *)arg4); + { + try { + std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(INode const *)arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29878,7 +31308,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_reserve(PyObject * SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector_reserve" "', argument " "2"" of type '" "std::vector< INode const * >::size_type""'"); } arg2 = static_cast< std::vector< INode const * >::size_type >(val2); - (arg1)->reserve(arg2); + { + try { + (arg1)->reserve(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29901,7 +31341,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_capacity(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_capacity" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = ((std::vector< INode const * > const *)arg1)->capacity(); + { + try { + result = ((std::vector< INode const * > const *)arg1)->capacity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -29923,7 +31373,17 @@ SWIGINTERN PyObject *_wrap_delete_swig_dummy_type_const_inode_vector(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_swig_dummy_type_const_inode_vector" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29960,7 +31420,17 @@ SWIGINTERN PyObject *_wrap_new_Material(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Material" "', argument " "1"" of type '" "Material const &""'"); } arg1 = reinterpret_cast< Material * >(argp1); - result = (Material *)new Material((Material const &)*arg1); + { + try { + result = (Material *)new Material((Material const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Material, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29983,7 +31453,17 @@ SWIGINTERN PyObject *_wrap_Material_inverted(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_inverted" "', argument " "1"" of type '" "Material const *""'"); } arg1 = reinterpret_cast< Material * >(argp1); - result = ((Material const *)arg1)->inverted(); + { + try { + result = ((Material const *)arg1)->inverted(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -30013,7 +31493,17 @@ SWIGINTERN PyObject *_wrap_Material_refractiveIndex(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_refractiveIndex" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Material const *)arg1)->refractiveIndex(arg2); + { + try { + result = ((Material const *)arg1)->refractiveIndex(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -30043,7 +31533,17 @@ SWIGINTERN PyObject *_wrap_Material_refractiveIndex2(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_refractiveIndex2" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Material const *)arg1)->refractiveIndex2(arg2); + { + try { + result = ((Material const *)arg1)->refractiveIndex2(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -30066,7 +31566,17 @@ SWIGINTERN PyObject *_wrap_Material_isScalarMaterial(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_isScalarMaterial" "', argument " "1"" of type '" "Material const *""'"); } arg1 = reinterpret_cast< Material * >(argp1); - result = (bool)((Material const *)arg1)->isScalarMaterial(); + { + try { + result = (bool)((Material const *)arg1)->isScalarMaterial(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30089,7 +31599,17 @@ SWIGINTERN PyObject *_wrap_Material_isMagneticMaterial(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_isMagneticMaterial" "', argument " "1"" of type '" "Material const *""'"); } arg1 = reinterpret_cast< Material * >(argp1); - result = (bool)((Material const *)arg1)->isMagneticMaterial(); + { + try { + result = (bool)((Material const *)arg1)->isMagneticMaterial(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30112,7 +31632,17 @@ SWIGINTERN PyObject *_wrap_Material_materialName(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_materialName" "', argument " "1"" of type '" "Material const *""'"); } arg1 = reinterpret_cast< Material * >(argp1); - result = ((Material const *)arg1)->materialName(); + { + try { + result = ((Material const *)arg1)->materialName(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -30135,7 +31665,17 @@ SWIGINTERN PyObject *_wrap_Material_magnetization(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_magnetization" "', argument " "1"" of type '" "Material const *""'"); } arg1 = reinterpret_cast< Material * >(argp1); - result = ((Material const *)arg1)->magnetization(); + { + try { + result = ((Material const *)arg1)->magnetization(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -30158,7 +31698,17 @@ SWIGINTERN PyObject *_wrap_Material_refractiveIndex_or_SLD(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_refractiveIndex_or_SLD" "', argument " "1"" of type '" "Material const *""'"); } arg1 = reinterpret_cast< Material * >(argp1); - result = ((Material const *)arg1)->refractiveIndex_or_SLD(); + { + try { + result = ((Material const *)arg1)->refractiveIndex_or_SLD(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -30181,7 +31731,17 @@ SWIGINTERN PyObject *_wrap_Material_isEmpty(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_isEmpty" "', argument " "1"" of type '" "Material const *""'"); } arg1 = reinterpret_cast< Material * >(argp1); - result = (bool)((Material const *)arg1)->isEmpty(); + { + try { + result = (bool)((Material const *)arg1)->isEmpty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30204,7 +31764,17 @@ SWIGINTERN PyObject *_wrap_Material_isDefaultMaterial(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_isDefaultMaterial" "', argument " "1"" of type '" "Material const *""'"); } arg1 = reinterpret_cast< Material * >(argp1); - result = (bool)((Material const *)arg1)->isDefaultMaterial(); + { + try { + result = (bool)((Material const *)arg1)->isDefaultMaterial(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -30237,7 +31807,17 @@ SWIGINTERN PyObject *_wrap_Material_scalarSubtrSLD(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Material_scalarSubtrSLD" "', argument " "2"" of type '" "WavevectorInfo const &""'"); } arg2 = reinterpret_cast< WavevectorInfo * >(argp2); - result = ((Material const *)arg1)->scalarSubtrSLD((WavevectorInfo const &)*arg2); + { + try { + result = ((Material const *)arg1)->scalarSubtrSLD((WavevectorInfo const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -30270,7 +31850,17 @@ SWIGINTERN PyObject *_wrap_Material_polarizedSubtrSLD(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Material_polarizedSubtrSLD" "', argument " "2"" of type '" "WavevectorInfo const &""'"); } arg2 = reinterpret_cast< WavevectorInfo * >(argp2); - result = ((Material const *)arg1)->polarizedSubtrSLD((WavevectorInfo const &)*arg2); + { + try { + result = ((Material const *)arg1)->polarizedSubtrSLD((WavevectorInfo const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SpinMatrix(result)), SWIGTYPE_p_SpinMatrix, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -30303,7 +31893,17 @@ SWIGINTERN PyObject *_wrap_Material_rotatedMaterial(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Material_rotatedMaterial" "', argument " "2"" of type '" "RotMatrix const &""'"); } arg2 = reinterpret_cast< RotMatrix * >(argp2); - result = ((Material const *)arg1)->rotatedMaterial((RotMatrix const &)*arg2); + { + try { + result = ((Material const *)arg1)->rotatedMaterial((RotMatrix const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -30325,7 +31925,17 @@ SWIGINTERN PyObject *_wrap_delete_Material(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Material" "', argument " "1"" of type '" "Material *""'"); } arg1 = reinterpret_cast< Material * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30394,7 +32004,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterial__SWIG_0(PyObject *self, Py_ssize_t if (SWIG_IsNewObj(res4)) delete temp; } } - result = RefractiveMaterial((std::string const &)*arg1,arg2,arg3,SWIG_STD_MOVE(arg4)); + { + try { + result = RefractiveMaterial((std::string const &)*arg1,arg2,arg3,SWIG_STD_MOVE(arg4)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -30438,7 +32058,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterial__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RefractiveMaterial" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = RefractiveMaterial((std::string const &)*arg1,arg2,arg3); + { + try { + result = RefractiveMaterial((std::string const &)*arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -30490,7 +32120,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterial__SWIG_2(PyObject *self, Py_ssize_t if (SWIG_IsNewObj(res3)) delete temp; } } - result = RefractiveMaterial((std::string const &)*arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + { + try { + result = RefractiveMaterial((std::string const &)*arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -30526,7 +32166,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterial__SWIG_3(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RefractiveMaterial" "', argument " "2"" of type '" "complex_t""'"); } arg2 = static_cast< complex_t >(val2); - result = RefractiveMaterial((std::string const &)*arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = RefractiveMaterial((std::string const &)*arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -30637,7 +32287,17 @@ SWIGINTERN PyObject *_wrap_Vacuum(PyObject *self, PyObject *args) { SwigValueWrapper< Material > result; if (!SWIG_Python_UnpackTuple(args, "Vacuum", 0, 0, 0)) SWIG_fail; - result = Vacuum(); + { + try { + result = Vacuum(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -30695,7 +32355,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLD__SWIG_0(PyObject *self, Py_ssize_t nobj if (SWIG_IsNewObj(res4)) delete temp; } } - result = MaterialBySLD((std::string const &)*arg1,arg2,arg3,SWIG_STD_MOVE(arg4)); + { + try { + result = MaterialBySLD((std::string const &)*arg1,arg2,arg3,SWIG_STD_MOVE(arg4)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -30739,7 +32409,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLD__SWIG_1(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MaterialBySLD" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = MaterialBySLD((std::string const &)*arg1,arg2,arg3); + { + try { + result = MaterialBySLD((std::string const &)*arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -30754,7 +32434,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLD__SWIG_2(PyObject *self, Py_ssize_t nobj SwigValueWrapper< Material > result; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = MaterialBySLD(); + { + try { + result = MaterialBySLD(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Material(result)), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -30842,7 +32532,17 @@ SWIGINTERN PyObject *_wrap_delete_IMaterialImpl(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IMaterialImpl" "', argument " "1"" of type '" "IMaterialImpl *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30865,7 +32565,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterialImpl_clone" "', argument " "1"" of type '" "IMaterialImpl const *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - result = (IMaterialImpl *)((IMaterialImpl const *)arg1)->clone(); + { + try { + result = (IMaterialImpl *)((IMaterialImpl const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterialImpl, 0 | 0 ); return resultobj; fail: @@ -30888,7 +32598,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_inverted(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterialImpl_inverted" "', argument " "1"" of type '" "IMaterialImpl const *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - result = (IMaterialImpl *)((IMaterialImpl const *)arg1)->inverted(); + { + try { + result = (IMaterialImpl *)((IMaterialImpl const *)arg1)->inverted(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterialImpl, 0 | 0 ); return resultobj; fail: @@ -30918,7 +32638,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_refractiveIndex(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMaterialImpl_refractiveIndex" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((IMaterialImpl const *)arg1)->refractiveIndex(arg2); + { + try { + result = ((IMaterialImpl const *)arg1)->refractiveIndex(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -30948,7 +32678,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_refractiveIndex2(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMaterialImpl_refractiveIndex2" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((IMaterialImpl const *)arg1)->refractiveIndex2(arg2); + { + try { + result = ((IMaterialImpl const *)arg1)->refractiveIndex2(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -30971,7 +32711,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_refractiveIndex_or_SLD(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterialImpl_refractiveIndex_or_SLD" "', argument " "1"" of type '" "IMaterialImpl const *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - result = ((IMaterialImpl const *)arg1)->refractiveIndex_or_SLD(); + { + try { + result = ((IMaterialImpl const *)arg1)->refractiveIndex_or_SLD(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -30994,7 +32744,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_typeID(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterialImpl_typeID" "', argument " "1"" of type '" "IMaterialImpl const *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - result = (MATERIAL_TYPES)((IMaterialImpl const *)arg1)->typeID(); + { + try { + result = (MATERIAL_TYPES)((IMaterialImpl const *)arg1)->typeID(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -31024,7 +32784,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_scalarSubtrSLD(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMaterialImpl_scalarSubtrSLD" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((IMaterialImpl const *)arg1)->scalarSubtrSLD(arg2); + { + try { + result = ((IMaterialImpl const *)arg1)->scalarSubtrSLD(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -31047,7 +32817,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_isScalarMaterial(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterialImpl_isScalarMaterial" "', argument " "1"" of type '" "IMaterialImpl const *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - result = (bool)((IMaterialImpl const *)arg1)->isScalarMaterial(); + { + try { + result = (bool)((IMaterialImpl const *)arg1)->isScalarMaterial(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31070,7 +32850,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_isMagneticMaterial(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterialImpl_isMagneticMaterial" "', argument " "1"" of type '" "IMaterialImpl const *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - result = (bool)((IMaterialImpl const *)arg1)->isMagneticMaterial(); + { + try { + result = (bool)((IMaterialImpl const *)arg1)->isMagneticMaterial(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31093,7 +32883,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_magnetization(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterialImpl_magnetization" "', argument " "1"" of type '" "IMaterialImpl const *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - result = ((IMaterialImpl const *)arg1)->magnetization(); + { + try { + result = ((IMaterialImpl const *)arg1)->magnetization(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -31126,7 +32926,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_polarizedSubtrSLD(PyObject *self, PyObj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMaterialImpl_polarizedSubtrSLD" "', argument " "2"" of type '" "WavevectorInfo const &""'"); } arg2 = reinterpret_cast< WavevectorInfo * >(argp2); - result = ((IMaterialImpl const *)arg1)->polarizedSubtrSLD((WavevectorInfo const &)*arg2); + { + try { + result = ((IMaterialImpl const *)arg1)->polarizedSubtrSLD((WavevectorInfo const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SpinMatrix(result)), SWIGTYPE_p_SpinMatrix, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -31159,7 +32969,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_rotatedMaterial(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMaterialImpl_rotatedMaterial" "', argument " "2"" of type '" "RotMatrix const &""'"); } arg2 = reinterpret_cast< RotMatrix * >(argp2); - result = (IMaterialImpl *)((IMaterialImpl const *)arg1)->rotatedMaterial((RotMatrix const &)*arg2); + { + try { + result = (IMaterialImpl *)((IMaterialImpl const *)arg1)->rotatedMaterial((RotMatrix const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterialImpl, 0 | 0 ); return resultobj; fail: @@ -31182,7 +33002,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl__print(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterialImpl__print" "', argument " "1"" of type '" "IMaterialImpl const *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - result = ((IMaterialImpl const *)arg1)->print(); + { + try { + result = ((IMaterialImpl const *)arg1)->print(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -31205,7 +33035,17 @@ SWIGINTERN PyObject *_wrap_IMaterialImpl_matName(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterialImpl_matName" "', argument " "1"" of type '" "IMaterialImpl const *""'"); } arg1 = reinterpret_cast< IMaterialImpl * >(argp1); - result = (std::string *) &((IMaterialImpl const *)arg1)->matName(); + { + try { + result = (std::string *) &((IMaterialImpl const *)arg1)->matName(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); return resultobj; fail: @@ -31234,7 +33074,17 @@ SWIGINTERN PyObject *_wrap_delete_RefractiveMaterialImpl(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RefractiveMaterialImpl" "', argument " "1"" of type '" "RefractiveMaterialImpl *""'"); } arg1 = reinterpret_cast< RefractiveMaterialImpl * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31257,7 +33107,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterialImpl_clone(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RefractiveMaterialImpl_clone" "', argument " "1"" of type '" "RefractiveMaterialImpl const *""'"); } arg1 = reinterpret_cast< RefractiveMaterialImpl * >(argp1); - result = (RefractiveMaterialImpl *)((RefractiveMaterialImpl const *)arg1)->clone(); + { + try { + result = (RefractiveMaterialImpl *)((RefractiveMaterialImpl const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RefractiveMaterialImpl, 0 | 0 ); return resultobj; fail: @@ -31287,7 +33147,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterialImpl_refractiveIndex(PyObject *self SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RefractiveMaterialImpl_refractiveIndex" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((RefractiveMaterialImpl const *)arg1)->refractiveIndex(arg2); + { + try { + result = ((RefractiveMaterialImpl const *)arg1)->refractiveIndex(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -31317,7 +33187,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterialImpl_refractiveIndex2(PyObject *sel SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RefractiveMaterialImpl_refractiveIndex2" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((RefractiveMaterialImpl const *)arg1)->refractiveIndex2(arg2); + { + try { + result = ((RefractiveMaterialImpl const *)arg1)->refractiveIndex2(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -31340,7 +33220,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterialImpl_refractiveIndex_or_SLD(PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RefractiveMaterialImpl_refractiveIndex_or_SLD" "', argument " "1"" of type '" "RefractiveMaterialImpl const *""'"); } arg1 = reinterpret_cast< RefractiveMaterialImpl * >(argp1); - result = ((RefractiveMaterialImpl const *)arg1)->refractiveIndex_or_SLD(); + { + try { + result = ((RefractiveMaterialImpl const *)arg1)->refractiveIndex_or_SLD(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -31363,7 +33253,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterialImpl_typeID(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RefractiveMaterialImpl_typeID" "', argument " "1"" of type '" "RefractiveMaterialImpl const *""'"); } arg1 = reinterpret_cast< RefractiveMaterialImpl * >(argp1); - result = (MATERIAL_TYPES)((RefractiveMaterialImpl const *)arg1)->typeID(); + { + try { + result = (MATERIAL_TYPES)((RefractiveMaterialImpl const *)arg1)->typeID(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -31393,7 +33293,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterialImpl_scalarSubtrSLD(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RefractiveMaterialImpl_scalarSubtrSLD" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((RefractiveMaterialImpl const *)arg1)->scalarSubtrSLD(arg2); + { + try { + result = ((RefractiveMaterialImpl const *)arg1)->scalarSubtrSLD(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -31416,7 +33326,17 @@ SWIGINTERN PyObject *_wrap_RefractiveMaterialImpl__print(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RefractiveMaterialImpl__print" "', argument " "1"" of type '" "RefractiveMaterialImpl const *""'"); } arg1 = reinterpret_cast< RefractiveMaterialImpl * >(argp1); - result = ((RefractiveMaterialImpl const *)arg1)->print(); + { + try { + result = ((RefractiveMaterialImpl const *)arg1)->print(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -31445,7 +33365,17 @@ SWIGINTERN PyObject *_wrap_delete_MaterialBySLDImpl(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MaterialBySLDImpl" "', argument " "1"" of type '" "MaterialBySLDImpl *""'"); } arg1 = reinterpret_cast< MaterialBySLDImpl * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31468,7 +33398,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLDImpl_clone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaterialBySLDImpl_clone" "', argument " "1"" of type '" "MaterialBySLDImpl const *""'"); } arg1 = reinterpret_cast< MaterialBySLDImpl * >(argp1); - result = (MaterialBySLDImpl *)((MaterialBySLDImpl const *)arg1)->clone(); + { + try { + result = (MaterialBySLDImpl *)((MaterialBySLDImpl const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaterialBySLDImpl, 0 | 0 ); return resultobj; fail: @@ -31498,7 +33438,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLDImpl_refractiveIndex(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MaterialBySLDImpl_refractiveIndex" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((MaterialBySLDImpl const *)arg1)->refractiveIndex(arg2); + { + try { + result = ((MaterialBySLDImpl const *)arg1)->refractiveIndex(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -31528,7 +33478,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLDImpl_refractiveIndex2(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MaterialBySLDImpl_refractiveIndex2" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((MaterialBySLDImpl const *)arg1)->refractiveIndex2(arg2); + { + try { + result = ((MaterialBySLDImpl const *)arg1)->refractiveIndex2(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -31551,7 +33511,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLDImpl_refractiveIndex_or_SLD(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaterialBySLDImpl_refractiveIndex_or_SLD" "', argument " "1"" of type '" "MaterialBySLDImpl const *""'"); } arg1 = reinterpret_cast< MaterialBySLDImpl * >(argp1); - result = ((MaterialBySLDImpl const *)arg1)->refractiveIndex_or_SLD(); + { + try { + result = ((MaterialBySLDImpl const *)arg1)->refractiveIndex_or_SLD(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -31574,7 +33544,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLDImpl_typeID(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaterialBySLDImpl_typeID" "', argument " "1"" of type '" "MaterialBySLDImpl const *""'"); } arg1 = reinterpret_cast< MaterialBySLDImpl * >(argp1); - result = (MATERIAL_TYPES)((MaterialBySLDImpl const *)arg1)->typeID(); + { + try { + result = (MATERIAL_TYPES)((MaterialBySLDImpl const *)arg1)->typeID(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -31604,7 +33584,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLDImpl_scalarSubtrSLD(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MaterialBySLDImpl_scalarSubtrSLD" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((MaterialBySLDImpl const *)arg1)->scalarSubtrSLD(arg2); + { + try { + result = ((MaterialBySLDImpl const *)arg1)->scalarSubtrSLD(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -31627,7 +33617,17 @@ SWIGINTERN PyObject *_wrap_MaterialBySLDImpl__print(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaterialBySLDImpl__print" "', argument " "1"" of type '" "MaterialBySLDImpl const *""'"); } arg1 = reinterpret_cast< MaterialBySLDImpl * >(argp1); - result = ((MaterialBySLDImpl const *)arg1)->print(); + { + try { + result = ((MaterialBySLDImpl const *)arg1)->print(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -31649,14 +33649,24 @@ SWIGINTERN PyObject *_wrap_new_ISampleNode__SWIG_0(PyObject *self, Py_ssize_t no if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; arg1 = swig_obj[0]; - if ( arg1 != Py_None ) { - /* subclassed */ - result = (ISampleNode *)new SwigDirector_ISampleNode(arg1); - } else { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); - SWIG_fail; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ISampleNode *)new SwigDirector_ISampleNode(arg1); + } else { + SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + SWIG_fail; + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ISampleNode, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -31684,14 +33694,24 @@ SWIGINTERN PyObject *_wrap_new_ISampleNode__SWIG_1(PyObject *self, Py_ssize_t no } arg2 = ptr; } - if ( arg1 != Py_None ) { - /* subclassed */ - result = (ISampleNode *)new SwigDirector_ISampleNode(arg1,(std::vector< double,std::allocator< double > > const &)*arg2); - } else { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); - SWIG_fail; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ISampleNode *)new SwigDirector_ISampleNode(arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + } else { + SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + SWIG_fail; + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ISampleNode, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -31757,10 +33777,20 @@ SWIGINTERN PyObject *_wrap_ISampleNode_clone(PyObject *self, PyObject *args) { director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - Swig::DirectorPureVirtualException::raise("ISampleNode::clone"); - } else { - result = (ISampleNode *)((ISampleNode const *)arg1)->clone(); + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("ISampleNode::clone"); + } else { + result = (ISampleNode *)((ISampleNode const *)arg1)->clone(); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -31795,7 +33825,17 @@ SWIGINTERN PyObject *_wrap_delete_ISampleNode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ISampleNode" "', argument " "1"" of type '" "ISampleNode *""'"); } arg1 = reinterpret_cast< ISampleNode * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31847,14 +33887,24 @@ SWIGINTERN PyObject *_wrap_new_IFormFactor__SWIG_0(PyObject *self, Py_ssize_t no if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; arg1 = swig_obj[0]; - if ( arg1 != Py_None ) { - /* subclassed */ - result = (IFormFactor *)new SwigDirector_IFormFactor(arg1); - } else { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); - SWIG_fail; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (IFormFactor *)new SwigDirector_IFormFactor(arg1); + } else { + SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + SWIG_fail; + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IFormFactor, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -31882,14 +33932,24 @@ SWIGINTERN PyObject *_wrap_new_IFormFactor__SWIG_1(PyObject *self, Py_ssize_t no } arg2 = ptr; } - if ( arg1 != Py_None ) { - /* subclassed */ - result = (IFormFactor *)new SwigDirector_IFormFactor(arg1,(std::vector< double,std::allocator< double > > const &)*arg2); - } else { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); - SWIG_fail; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (IFormFactor *)new SwigDirector_IFormFactor(arg1,(std::vector< double,std::allocator< double > > const &)*arg2); + } else { + SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + SWIG_fail; + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IFormFactor, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -31949,7 +34009,17 @@ SWIGINTERN PyObject *_wrap_delete_IFormFactor(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IFormFactor" "', argument " "1"" of type '" "IFormFactor *""'"); } arg1 = reinterpret_cast< IFormFactor * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31977,10 +34047,20 @@ SWIGINTERN PyObject *_wrap_IFormFactor_clone(PyObject *self, PyObject *args) { director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - Swig::DirectorPureVirtualException::raise("IFormFactor::clone"); - } else { - result = (IFormFactor *)((IFormFactor const *)arg1)->clone(); + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("IFormFactor::clone"); + } else { + result = (IFormFactor *)((IFormFactor const *)arg1)->clone(); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -32021,10 +34101,20 @@ SWIGINTERN PyObject *_wrap_IFormFactor_volume(PyObject *self, PyObject *args) { director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = (double)((IFormFactor const *)arg1)->IFormFactor::volume(); - } else { - result = (double)((IFormFactor const *)arg1)->volume(); + { + try { + if (upcall) { + result = (double)((IFormFactor const *)arg1)->IFormFactor::volume(); + } else { + result = (double)((IFormFactor const *)arg1)->volume(); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -32056,10 +34146,20 @@ SWIGINTERN PyObject *_wrap_IFormFactor_radialExtension(PyObject *self, PyObject director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - Swig::DirectorPureVirtualException::raise("IFormFactor::radialExtension"); - } else { - result = (double)((IFormFactor const *)arg1)->radialExtension(); + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("IFormFactor::radialExtension"); + } else { + result = (double)((IFormFactor const *)arg1)->radialExtension(); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -32098,10 +34198,20 @@ SWIGINTERN PyObject *_wrap_IFormFactor_spanZ(PyObject *self, PyObject *args) { director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = ((IFormFactor const *)arg1)->IFormFactor::spanZ((IRotation const *)arg2); - } else { - result = ((IFormFactor const *)arg1)->spanZ((IRotation const *)arg2); + { + try { + if (upcall) { + result = ((IFormFactor const *)arg1)->IFormFactor::spanZ((IRotation const *)arg2); + } else { + result = ((IFormFactor const *)arg1)->spanZ((IRotation const *)arg2); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -32128,7 +34238,17 @@ SWIGINTERN PyObject *_wrap_IFormFactor_pythonConstructor(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFormFactor_pythonConstructor" "', argument " "1"" of type '" "IFormFactor const *""'"); } arg1 = reinterpret_cast< IFormFactor * >(argp1); - result = ((IFormFactor const *)arg1)->pythonConstructor(); + { + try { + result = ((IFormFactor const *)arg1)->pythonConstructor(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -32163,10 +34283,20 @@ SWIGINTERN PyObject *_wrap_IFormFactor_canSliceAnalytically(PyObject *self, PyOb director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = (bool)((IFormFactor const *)arg1)->IFormFactor::canSliceAnalytically((IRotation const *)arg2); - } else { - result = (bool)((IFormFactor const *)arg1)->canSliceAnalytically((IRotation const *)arg2); + { + try { + if (upcall) { + result = (bool)((IFormFactor const *)arg1)->IFormFactor::canSliceAnalytically((IRotation const *)arg2); + } else { + result = (bool)((IFormFactor const *)arg1)->canSliceAnalytically((IRotation const *)arg2); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -32203,7 +34333,17 @@ SWIGINTERN PyObject *_wrap_IFormFactor_theFF(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IFormFactor_theFF" "', argument " "2"" of type '" "WavevectorInfo const &""'"); } arg2 = reinterpret_cast< WavevectorInfo * >(argp2); - result = ((IFormFactor const *)arg1)->theFF((WavevectorInfo const &)*arg2); + { + try { + result = ((IFormFactor const *)arg1)->theFF((WavevectorInfo const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -32236,7 +34376,17 @@ SWIGINTERN PyObject *_wrap_IFormFactor_thePolFF(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IFormFactor_thePolFF" "', argument " "2"" of type '" "WavevectorInfo const &""'"); } arg2 = reinterpret_cast< WavevectorInfo * >(argp2); - result = ((IFormFactor const *)arg1)->thePolFF((WavevectorInfo const &)*arg2); + { + try { + result = ((IFormFactor const *)arg1)->thePolFF((WavevectorInfo const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SpinMatrix(result)), SWIGTYPE_p_SpinMatrix, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -32274,7 +34424,17 @@ SWIGINTERN PyObject *_wrap_IFormFactor_formfactor_pol(PyObject *self, PyObject * if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((IFormFactor const *)arg1)->formfactor_pol(arg2); + { + try { + result = ((IFormFactor const *)arg1)->formfactor_pol(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SpinMatrix(result)), SWIGTYPE_p_SpinMatrix, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -32317,10 +34477,20 @@ SWIGINTERN PyObject *_wrap_IFormFactor_formfactor(PyObject *self, PyObject *args director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - Swig::DirectorPureVirtualException::raise("IFormFactor::formfactor"); - } else { - result = ((IFormFactor const *)arg1)->formfactor(arg2); + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("IFormFactor::formfactor"); + } else { + result = ((IFormFactor const *)arg1)->formfactor(arg2); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -32387,7 +34557,17 @@ SWIGINTERN PyObject *_wrap_IRotation_createRotation(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IRotation_createRotation" "', argument " "1"" of type '" "RotMatrix const &""'"); } arg1 = reinterpret_cast< RotMatrix * >(argp1); - result = (IRotation *)IRotation::createRotation((Rotation3D< double > const &)*arg1); + { + try { + result = (IRotation *)IRotation::createRotation((Rotation3D< double > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IRotation, 0 | 0 ); return resultobj; fail: @@ -32410,7 +34590,17 @@ SWIGINTERN PyObject *_wrap_IRotation_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IRotation_clone" "', argument " "1"" of type '" "IRotation const *""'"); } arg1 = reinterpret_cast< IRotation * >(argp1); - result = (IRotation *)((IRotation const *)arg1)->clone(); + { + try { + result = (IRotation *)((IRotation const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IRotation, 0 | 0 ); return resultobj; fail: @@ -32433,7 +34623,17 @@ SWIGINTERN PyObject *_wrap_IRotation_createInverse(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IRotation_createInverse" "', argument " "1"" of type '" "IRotation const *""'"); } arg1 = reinterpret_cast< IRotation * >(argp1); - result = (IRotation *)((IRotation const *)arg1)->createInverse(); + { + try { + result = (IRotation *)((IRotation const *)arg1)->createInverse(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IRotation, 0 | 0 ); return resultobj; fail: @@ -32456,7 +34656,17 @@ SWIGINTERN PyObject *_wrap_IRotation_rotMatrix(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IRotation_rotMatrix" "', argument " "1"" of type '" "IRotation const *""'"); } arg1 = reinterpret_cast< IRotation * >(argp1); - result = ((IRotation const *)arg1)->rotMatrix(); + { + try { + result = ((IRotation const *)arg1)->rotMatrix(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RotMatrix(result)), SWIGTYPE_p_Rotation3DT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -32489,7 +34699,17 @@ SWIGINTERN PyObject *_wrap_IRotation_transformed(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IRotation_transformed" "', argument " "2"" of type '" "R3 const &""'"); } arg2 = reinterpret_cast< R3 * >(argp2); - result = ((IRotation const *)arg1)->transformed((R3 const &)*arg2); + { + try { + result = ((IRotation const *)arg1)->transformed((R3 const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -32512,7 +34732,17 @@ SWIGINTERN PyObject *_wrap_IRotation_isIdentity(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IRotation_isIdentity" "', argument " "1"" of type '" "IRotation const *""'"); } arg1 = reinterpret_cast< IRotation * >(argp1); - result = (bool)((IRotation const *)arg1)->isIdentity(); + { + try { + result = (bool)((IRotation const *)arg1)->isIdentity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -32535,7 +34765,17 @@ SWIGINTERN PyObject *_wrap_IRotation_zInvariant(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IRotation_zInvariant" "', argument " "1"" of type '" "IRotation const *""'"); } arg1 = reinterpret_cast< IRotation * >(argp1); - result = (bool)((IRotation const *)arg1)->zInvariant(); + { + try { + result = (bool)((IRotation const *)arg1)->zInvariant(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -32557,7 +34797,17 @@ SWIGINTERN PyObject *_wrap_delete_IRotation(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IRotation" "', argument " "1"" of type '" "IRotation *""'"); } arg1 = reinterpret_cast< IRotation * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32600,7 +34850,17 @@ SWIGINTERN PyObject *_wrap_createProduct(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "createProduct" "', argument " "2"" of type '" "IRotation const &""'"); } arg2 = reinterpret_cast< IRotation * >(argp2); - result = (IRotation *)createProduct((IRotation const &)*arg1,(IRotation const &)*arg2); + { + try { + result = (IRotation *)createProduct((IRotation const &)*arg1,(IRotation const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IRotation, 0 | 0 ); return resultobj; fail: @@ -32613,7 +34873,17 @@ SWIGINTERN PyObject *_wrap_new_IdentityRotation(PyObject *self, PyObject *args) IdentityRotation *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_IdentityRotation", 0, 0, 0)) SWIG_fail; - result = (IdentityRotation *)new IdentityRotation(); + { + try { + result = (IdentityRotation *)new IdentityRotation(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IdentityRotation, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32636,7 +34906,17 @@ SWIGINTERN PyObject *_wrap_IdentityRotation_clone(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IdentityRotation_clone" "', argument " "1"" of type '" "IdentityRotation const *""'"); } arg1 = reinterpret_cast< IdentityRotation * >(argp1); - result = (IdentityRotation *)((IdentityRotation const *)arg1)->clone(); + { + try { + result = (IdentityRotation *)((IdentityRotation const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IdentityRotation, 0 | 0 ); return resultobj; fail: @@ -32659,7 +34939,17 @@ SWIGINTERN PyObject *_wrap_IdentityRotation_className(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IdentityRotation_className" "', argument " "1"" of type '" "IdentityRotation const *""'"); } arg1 = reinterpret_cast< IdentityRotation * >(argp1); - result = ((IdentityRotation const *)arg1)->className(); + { + try { + result = ((IdentityRotation const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -32682,7 +34972,17 @@ SWIGINTERN PyObject *_wrap_IdentityRotation_createInverse(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IdentityRotation_createInverse" "', argument " "1"" of type '" "IdentityRotation const *""'"); } arg1 = reinterpret_cast< IdentityRotation * >(argp1); - result = (IdentityRotation *)((IdentityRotation const *)arg1)->createInverse(); + { + try { + result = (IdentityRotation *)((IdentityRotation const *)arg1)->createInverse(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IdentityRotation, 0 | 0 ); return resultobj; fail: @@ -32705,7 +35005,17 @@ SWIGINTERN PyObject *_wrap_IdentityRotation_rotMatrix(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IdentityRotation_rotMatrix" "', argument " "1"" of type '" "IdentityRotation const *""'"); } arg1 = reinterpret_cast< IdentityRotation * >(argp1); - result = ((IdentityRotation const *)arg1)->rotMatrix(); + { + try { + result = ((IdentityRotation const *)arg1)->rotMatrix(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RotMatrix(result)), SWIGTYPE_p_Rotation3DT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -32728,7 +35038,17 @@ SWIGINTERN PyObject *_wrap_IdentityRotation_isIdentity(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IdentityRotation_isIdentity" "', argument " "1"" of type '" "IdentityRotation const *""'"); } arg1 = reinterpret_cast< IdentityRotation * >(argp1); - result = (bool)((IdentityRotation const *)arg1)->isIdentity(); + { + try { + result = (bool)((IdentityRotation const *)arg1)->isIdentity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -32750,7 +35070,17 @@ SWIGINTERN PyObject *_wrap_delete_IdentityRotation(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IdentityRotation" "', argument " "1"" of type '" "IdentityRotation *""'"); } arg1 = reinterpret_cast< IdentityRotation * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32784,7 +35114,17 @@ SWIGINTERN PyObject *_wrap_new_RotationX__SWIG_0(PyObject *self, Py_ssize_t nobj arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (RotationX *)new RotationX(arg1); + { + try { + result = (RotationX *)new RotationX(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationX, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32805,7 +35145,17 @@ SWIGINTERN PyObject *_wrap_new_RotationX__SWIG_1(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RotationX" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (RotationX *)new RotationX(arg1); + { + try { + result = (RotationX *)new RotationX(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationX, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32864,7 +35214,17 @@ SWIGINTERN PyObject *_wrap_RotationX_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationX_clone" "', argument " "1"" of type '" "RotationX const *""'"); } arg1 = reinterpret_cast< RotationX * >(argp1); - result = (RotationX *)((RotationX const *)arg1)->clone(); + { + try { + result = (RotationX *)((RotationX const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationX, 0 | 0 ); return resultobj; fail: @@ -32887,7 +35247,17 @@ SWIGINTERN PyObject *_wrap_RotationX_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationX_className" "', argument " "1"" of type '" "RotationX const *""'"); } arg1 = reinterpret_cast< RotationX * >(argp1); - result = ((RotationX const *)arg1)->className(); + { + try { + result = ((RotationX const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -32910,7 +35280,17 @@ SWIGINTERN PyObject *_wrap_RotationX_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationX_parDefs" "', argument " "1"" of type '" "RotationX const *""'"); } arg1 = reinterpret_cast< RotationX * >(argp1); - result = ((RotationX const *)arg1)->parDefs(); + { + try { + result = ((RotationX const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -32933,7 +35313,17 @@ SWIGINTERN PyObject *_wrap_RotationX_createInverse(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationX_createInverse" "', argument " "1"" of type '" "RotationX const *""'"); } arg1 = reinterpret_cast< RotationX * >(argp1); - result = (RotationX *)((RotationX const *)arg1)->createInverse(); + { + try { + result = (RotationX *)((RotationX const *)arg1)->createInverse(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationX, 0 | 0 ); return resultobj; fail: @@ -32956,7 +35346,17 @@ SWIGINTERN PyObject *_wrap_RotationX_angle(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationX_angle" "', argument " "1"" of type '" "RotationX const *""'"); } arg1 = reinterpret_cast< RotationX * >(argp1); - result = (double)((RotationX const *)arg1)->angle(); + { + try { + result = (double)((RotationX const *)arg1)->angle(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -32979,7 +35379,17 @@ SWIGINTERN PyObject *_wrap_RotationX_rotMatrix(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationX_rotMatrix" "', argument " "1"" of type '" "RotationX const *""'"); } arg1 = reinterpret_cast< RotationX * >(argp1); - result = ((RotationX const *)arg1)->rotMatrix(); + { + try { + result = ((RotationX const *)arg1)->rotMatrix(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RotMatrix(result)), SWIGTYPE_p_Rotation3DT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -33001,7 +35411,17 @@ SWIGINTERN PyObject *_wrap_delete_RotationX(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RotationX" "', argument " "1"" of type '" "RotationX *""'"); } arg1 = reinterpret_cast< RotationX * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33035,7 +35455,17 @@ SWIGINTERN PyObject *_wrap_new_RotationY__SWIG_0(PyObject *self, Py_ssize_t nobj arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (RotationY *)new RotationY(arg1); + { + try { + result = (RotationY *)new RotationY(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationY, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33056,7 +35486,17 @@ SWIGINTERN PyObject *_wrap_new_RotationY__SWIG_1(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RotationY" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (RotationY *)new RotationY(arg1); + { + try { + result = (RotationY *)new RotationY(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationY, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33115,7 +35555,17 @@ SWIGINTERN PyObject *_wrap_RotationY_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationY_clone" "', argument " "1"" of type '" "RotationY const *""'"); } arg1 = reinterpret_cast< RotationY * >(argp1); - result = (RotationY *)((RotationY const *)arg1)->clone(); + { + try { + result = (RotationY *)((RotationY const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationY, 0 | 0 ); return resultobj; fail: @@ -33138,7 +35588,17 @@ SWIGINTERN PyObject *_wrap_RotationY_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationY_className" "', argument " "1"" of type '" "RotationY const *""'"); } arg1 = reinterpret_cast< RotationY * >(argp1); - result = ((RotationY const *)arg1)->className(); + { + try { + result = ((RotationY const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -33161,7 +35621,17 @@ SWIGINTERN PyObject *_wrap_RotationY_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationY_parDefs" "', argument " "1"" of type '" "RotationY const *""'"); } arg1 = reinterpret_cast< RotationY * >(argp1); - result = ((RotationY const *)arg1)->parDefs(); + { + try { + result = ((RotationY const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -33184,7 +35654,17 @@ SWIGINTERN PyObject *_wrap_RotationY_createInverse(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationY_createInverse" "', argument " "1"" of type '" "RotationY const *""'"); } arg1 = reinterpret_cast< RotationY * >(argp1); - result = (RotationY *)((RotationY const *)arg1)->createInverse(); + { + try { + result = (RotationY *)((RotationY const *)arg1)->createInverse(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationY, 0 | 0 ); return resultobj; fail: @@ -33207,7 +35687,17 @@ SWIGINTERN PyObject *_wrap_RotationY_angle(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationY_angle" "', argument " "1"" of type '" "RotationY const *""'"); } arg1 = reinterpret_cast< RotationY * >(argp1); - result = (double)((RotationY const *)arg1)->angle(); + { + try { + result = (double)((RotationY const *)arg1)->angle(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -33230,7 +35720,17 @@ SWIGINTERN PyObject *_wrap_RotationY_rotMatrix(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationY_rotMatrix" "', argument " "1"" of type '" "RotationY const *""'"); } arg1 = reinterpret_cast< RotationY * >(argp1); - result = ((RotationY const *)arg1)->rotMatrix(); + { + try { + result = ((RotationY const *)arg1)->rotMatrix(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RotMatrix(result)), SWIGTYPE_p_Rotation3DT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -33252,7 +35752,17 @@ SWIGINTERN PyObject *_wrap_delete_RotationY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RotationY" "', argument " "1"" of type '" "RotationY *""'"); } arg1 = reinterpret_cast< RotationY * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33286,7 +35796,17 @@ SWIGINTERN PyObject *_wrap_new_RotationZ__SWIG_0(PyObject *self, Py_ssize_t nobj arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (RotationZ *)new RotationZ(arg1); + { + try { + result = (RotationZ *)new RotationZ(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationZ, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33307,7 +35827,17 @@ SWIGINTERN PyObject *_wrap_new_RotationZ__SWIG_1(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RotationZ" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (RotationZ *)new RotationZ(arg1); + { + try { + result = (RotationZ *)new RotationZ(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationZ, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33366,7 +35896,17 @@ SWIGINTERN PyObject *_wrap_RotationZ_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationZ_clone" "', argument " "1"" of type '" "RotationZ const *""'"); } arg1 = reinterpret_cast< RotationZ * >(argp1); - result = (RotationZ *)((RotationZ const *)arg1)->clone(); + { + try { + result = (RotationZ *)((RotationZ const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationZ, 0 | 0 ); return resultobj; fail: @@ -33389,7 +35929,17 @@ SWIGINTERN PyObject *_wrap_RotationZ_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationZ_className" "', argument " "1"" of type '" "RotationZ const *""'"); } arg1 = reinterpret_cast< RotationZ * >(argp1); - result = ((RotationZ const *)arg1)->className(); + { + try { + result = ((RotationZ const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -33412,7 +35962,17 @@ SWIGINTERN PyObject *_wrap_RotationZ_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationZ_parDefs" "', argument " "1"" of type '" "RotationZ const *""'"); } arg1 = reinterpret_cast< RotationZ * >(argp1); - result = ((RotationZ const *)arg1)->parDefs(); + { + try { + result = ((RotationZ const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -33435,7 +35995,17 @@ SWIGINTERN PyObject *_wrap_RotationZ_createInverse(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationZ_createInverse" "', argument " "1"" of type '" "RotationZ const *""'"); } arg1 = reinterpret_cast< RotationZ * >(argp1); - result = (RotationZ *)((RotationZ const *)arg1)->createInverse(); + { + try { + result = (RotationZ *)((RotationZ const *)arg1)->createInverse(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationZ, 0 | 0 ); return resultobj; fail: @@ -33458,7 +36028,17 @@ SWIGINTERN PyObject *_wrap_RotationZ_angle(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationZ_angle" "', argument " "1"" of type '" "RotationZ const *""'"); } arg1 = reinterpret_cast< RotationZ * >(argp1); - result = (double)((RotationZ const *)arg1)->angle(); + { + try { + result = (double)((RotationZ const *)arg1)->angle(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -33481,7 +36061,17 @@ SWIGINTERN PyObject *_wrap_RotationZ_rotMatrix(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationZ_rotMatrix" "', argument " "1"" of type '" "RotationZ const *""'"); } arg1 = reinterpret_cast< RotationZ * >(argp1); - result = ((RotationZ const *)arg1)->rotMatrix(); + { + try { + result = ((RotationZ const *)arg1)->rotMatrix(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RotMatrix(result)), SWIGTYPE_p_Rotation3DT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -33503,7 +36093,17 @@ SWIGINTERN PyObject *_wrap_delete_RotationZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RotationZ" "', argument " "1"" of type '" "RotationZ *""'"); } arg1 = reinterpret_cast< RotationZ * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33537,7 +36137,17 @@ SWIGINTERN PyObject *_wrap_new_RotationEuler__SWIG_0(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (RotationEuler *)new RotationEuler(arg1); + { + try { + result = (RotationEuler *)new RotationEuler(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationEuler, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33574,7 +36184,17 @@ SWIGINTERN PyObject *_wrap_new_RotationEuler__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_RotationEuler" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (RotationEuler *)new RotationEuler(arg1,arg2,arg3); + { + try { + result = (RotationEuler *)new RotationEuler(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationEuler, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33645,7 +36265,17 @@ SWIGINTERN PyObject *_wrap_RotationEuler_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationEuler_clone" "', argument " "1"" of type '" "RotationEuler const *""'"); } arg1 = reinterpret_cast< RotationEuler * >(argp1); - result = (RotationEuler *)((RotationEuler const *)arg1)->clone(); + { + try { + result = (RotationEuler *)((RotationEuler const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RotationEuler, 0 | 0 ); return resultobj; fail: @@ -33668,7 +36298,17 @@ SWIGINTERN PyObject *_wrap_RotationEuler_className(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationEuler_className" "', argument " "1"" of type '" "RotationEuler const *""'"); } arg1 = reinterpret_cast< RotationEuler * >(argp1); - result = ((RotationEuler const *)arg1)->className(); + { + try { + result = ((RotationEuler const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -33691,7 +36331,17 @@ SWIGINTERN PyObject *_wrap_RotationEuler_parDefs(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationEuler_parDefs" "', argument " "1"" of type '" "RotationEuler const *""'"); } arg1 = reinterpret_cast< RotationEuler * >(argp1); - result = ((RotationEuler const *)arg1)->parDefs(); + { + try { + result = ((RotationEuler const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -33714,7 +36364,17 @@ SWIGINTERN PyObject *_wrap_RotationEuler_createInverse(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationEuler_createInverse" "', argument " "1"" of type '" "RotationEuler const *""'"); } arg1 = reinterpret_cast< RotationEuler * >(argp1); - result = (IRotation *)((RotationEuler const *)arg1)->createInverse(); + { + try { + result = (IRotation *)((RotationEuler const *)arg1)->createInverse(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IRotation, 0 | 0 ); return resultobj; fail: @@ -33737,7 +36397,17 @@ SWIGINTERN PyObject *_wrap_RotationEuler_alpha(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationEuler_alpha" "', argument " "1"" of type '" "RotationEuler const *""'"); } arg1 = reinterpret_cast< RotationEuler * >(argp1); - result = (double)((RotationEuler const *)arg1)->alpha(); + { + try { + result = (double)((RotationEuler const *)arg1)->alpha(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -33760,7 +36430,17 @@ SWIGINTERN PyObject *_wrap_RotationEuler_beta(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationEuler_beta" "', argument " "1"" of type '" "RotationEuler const *""'"); } arg1 = reinterpret_cast< RotationEuler * >(argp1); - result = (double)((RotationEuler const *)arg1)->beta(); + { + try { + result = (double)((RotationEuler const *)arg1)->beta(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -33783,7 +36463,17 @@ SWIGINTERN PyObject *_wrap_RotationEuler_gamma(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationEuler_gamma" "', argument " "1"" of type '" "RotationEuler const *""'"); } arg1 = reinterpret_cast< RotationEuler * >(argp1); - result = (double)((RotationEuler const *)arg1)->gamma(); + { + try { + result = (double)((RotationEuler const *)arg1)->gamma(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -33806,7 +36496,17 @@ SWIGINTERN PyObject *_wrap_RotationEuler_rotMatrix(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RotationEuler_rotMatrix" "', argument " "1"" of type '" "RotationEuler const *""'"); } arg1 = reinterpret_cast< RotationEuler * >(argp1); - result = ((RotationEuler const *)arg1)->rotMatrix(); + { + try { + result = ((RotationEuler const *)arg1)->rotMatrix(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new RotMatrix(result)), SWIGTYPE_p_Rotation3DT_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -33828,7 +36528,17 @@ SWIGINTERN PyObject *_wrap_delete_RotationEuler(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RotationEuler" "', argument " "1"" of type '" "RotationEuler *""'"); } arg1 = reinterpret_cast< RotationEuler * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33882,7 +36592,17 @@ SWIGINTERN PyObject *_wrap_new_Crystal__SWIG_0(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Crystal" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Crystal *)new Crystal((IParticle const &)*arg1,(Lattice3D const &)*arg2,arg3); + { + try { + result = (Crystal *)new Crystal((IParticle const &)*arg1,(Lattice3D const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Crystal, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33917,7 +36637,17 @@ SWIGINTERN PyObject *_wrap_new_Crystal__SWIG_1(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Crystal" "', argument " "2"" of type '" "Lattice3D const &""'"); } arg2 = reinterpret_cast< Lattice3D * >(argp2); - result = (Crystal *)new Crystal((IParticle const &)*arg1,(Lattice3D const &)*arg2); + { + try { + result = (Crystal *)new Crystal((IParticle const &)*arg1,(Lattice3D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Crystal, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33987,7 +36717,17 @@ SWIGINTERN PyObject *_wrap_delete_Crystal(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Crystal" "', argument " "1"" of type '" "Crystal *""'"); } arg1 = reinterpret_cast< Crystal * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34010,7 +36750,17 @@ SWIGINTERN PyObject *_wrap_Crystal_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Crystal_clone" "', argument " "1"" of type '" "Crystal const *""'"); } arg1 = reinterpret_cast< Crystal * >(argp1); - result = (Crystal *)((Crystal const *)arg1)->clone(); + { + try { + result = (Crystal *)((Crystal const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Crystal, 0 | 0 ); return resultobj; fail: @@ -34033,7 +36783,17 @@ SWIGINTERN PyObject *_wrap_Crystal_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Crystal_className" "', argument " "1"" of type '" "Crystal const *""'"); } arg1 = reinterpret_cast< Crystal * >(argp1); - result = ((Crystal const *)arg1)->className(); + { + try { + result = ((Crystal const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34056,7 +36816,17 @@ SWIGINTERN PyObject *_wrap_Crystal_nodeChildren(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Crystal_nodeChildren" "', argument " "1"" of type '" "Crystal const *""'"); } arg1 = reinterpret_cast< Crystal * >(argp1); - result = ((Crystal const *)arg1)->nodeChildren(); + { + try { + result = ((Crystal const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -34079,7 +36849,17 @@ SWIGINTERN PyObject *_wrap_Crystal_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Crystal_parDefs" "', argument " "1"" of type '" "Crystal const *""'"); } arg1 = reinterpret_cast< Crystal * >(argp1); - result = ((Crystal const *)arg1)->parDefs(); + { + try { + result = ((Crystal const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -34102,7 +36882,17 @@ SWIGINTERN PyObject *_wrap_Crystal_basis(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Crystal_basis" "', argument " "1"" of type '" "Crystal const *""'"); } arg1 = reinterpret_cast< Crystal * >(argp1); - result = (IParticle *)((Crystal const *)arg1)->basis(); + { + try { + result = (IParticle *)((Crystal const *)arg1)->basis(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IParticle, 0 | 0 ); return resultobj; fail: @@ -34125,7 +36915,17 @@ SWIGINTERN PyObject *_wrap_Crystal_lattice(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Crystal_lattice" "', argument " "1"" of type '" "Crystal const *""'"); } arg1 = reinterpret_cast< Crystal * >(argp1); - result = (Lattice3D *)((Crystal const *)arg1)->lattice(); + { + try { + result = (Lattice3D *)((Crystal const *)arg1)->lattice(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice3D, 0 | 0 ); return resultobj; fail: @@ -34148,7 +36948,17 @@ SWIGINTERN PyObject *_wrap_Crystal_position_variance(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Crystal_position_variance" "', argument " "1"" of type '" "Crystal const *""'"); } arg1 = reinterpret_cast< Crystal * >(argp1); - result = (double)((Crystal const *)arg1)->position_variance(); + { + try { + result = (double)((Crystal const *)arg1)->position_variance(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -34189,7 +36999,17 @@ SWIGINTERN PyObject *_wrap_Crystal_transformed(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Crystal_transformed" "', argument " "3"" of type '" "IRotation const *""'"); } arg3 = reinterpret_cast< IRotation * >(argp3); - result = (Crystal *)((Crystal const *)arg1)->transformed((R3 const &)*arg2,(IRotation const *)arg3); + { + try { + result = (Crystal *)((Crystal const *)arg1)->transformed((R3 const &)*arg2,(IRotation const *)arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Crystal, 0 | 0 ); return resultobj; fail: @@ -34212,7 +37032,17 @@ SWIGINTERN PyObject *_wrap_Crystal_validate(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Crystal_validate" "', argument " "1"" of type '" "Crystal const *""'"); } arg1 = reinterpret_cast< Crystal * >(argp1); - result = ((Crystal const *)arg1)->validate(); + { + try { + result = ((Crystal const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34245,7 +37075,17 @@ SWIGINTERN PyObject *_wrap_delete_IParticle(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IParticle" "', argument " "1"" of type '" "IParticle *""'"); } arg1 = reinterpret_cast< IParticle * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34268,7 +37108,17 @@ SWIGINTERN PyObject *_wrap_IParticle_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IParticle_clone" "', argument " "1"" of type '" "IParticle const *""'"); } arg1 = reinterpret_cast< IParticle * >(argp1); - result = (IParticle *)((IParticle const *)arg1)->clone(); + { + try { + result = (IParticle *)((IParticle const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IParticle, 0 | 0 ); return resultobj; fail: @@ -34305,7 +37155,17 @@ SWIGINTERN PyObject *_wrap_IParticle_translate__SWIG_0(PyObject *self, Py_ssize_ if (SWIG_IsNewObj(res2)) delete temp; } } - result = (IParticle *)(arg1)->translate(arg2); + { + try { + result = (IParticle *)(arg1)->translate(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IParticle, 0 | 0 ); return resultobj; fail: @@ -34350,7 +37210,17 @@ SWIGINTERN PyObject *_wrap_IParticle_translate__SWIG_1(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IParticle_translate" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (IParticle *)(arg1)->translate(arg2,arg3,arg4); + { + try { + result = (IParticle *)(arg1)->translate(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IParticle, 0 | 0 ); return resultobj; fail: @@ -34441,7 +37311,17 @@ SWIGINTERN PyObject *_wrap_IParticle_rotate(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IParticle_rotate" "', argument " "2"" of type '" "IRotation const &""'"); } arg2 = reinterpret_cast< IRotation * >(argp2); - result = (IParticle *)(arg1)->rotate((IRotation const &)*arg2); + { + try { + result = (IParticle *)(arg1)->rotate((IRotation const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IParticle, 0 | 0 ); return resultobj; fail: @@ -34484,7 +37364,17 @@ SWIGINTERN PyObject *_wrap_new_Mesocrystal(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Mesocrystal" "', argument " "2"" of type '" "IFormFactor const &""'"); } arg2 = reinterpret_cast< IFormFactor * >(argp2); - result = (Mesocrystal *)new Mesocrystal((Crystal const &)*arg1,(IFormFactor const &)*arg2); + { + try { + result = (Mesocrystal *)new Mesocrystal((Crystal const &)*arg1,(IFormFactor const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Mesocrystal, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34506,7 +37396,17 @@ SWIGINTERN PyObject *_wrap_delete_Mesocrystal(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Mesocrystal" "', argument " "1"" of type '" "Mesocrystal *""'"); } arg1 = reinterpret_cast< Mesocrystal * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34529,7 +37429,17 @@ SWIGINTERN PyObject *_wrap_Mesocrystal_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Mesocrystal_clone" "', argument " "1"" of type '" "Mesocrystal const *""'"); } arg1 = reinterpret_cast< Mesocrystal * >(argp1); - result = (Mesocrystal *)((Mesocrystal const *)arg1)->clone(); + { + try { + result = (Mesocrystal *)((Mesocrystal const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Mesocrystal, 0 | 0 ); return resultobj; fail: @@ -34552,7 +37462,17 @@ SWIGINTERN PyObject *_wrap_Mesocrystal_className(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Mesocrystal_className" "', argument " "1"" of type '" "Mesocrystal const *""'"); } arg1 = reinterpret_cast< Mesocrystal * >(argp1); - result = ((Mesocrystal const *)arg1)->className(); + { + try { + result = ((Mesocrystal const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34575,7 +37495,17 @@ SWIGINTERN PyObject *_wrap_Mesocrystal_nodeChildren(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Mesocrystal_nodeChildren" "', argument " "1"" of type '" "Mesocrystal const *""'"); } arg1 = reinterpret_cast< Mesocrystal * >(argp1); - result = ((Mesocrystal const *)arg1)->nodeChildren(); + { + try { + result = ((Mesocrystal const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -34627,7 +37557,17 @@ SWIGINTERN PyObject *_wrap_new_Particle(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Particle" "', argument " "2"" of type '" "IFormFactor const &""'"); } arg2 = reinterpret_cast< IFormFactor * >(argp2); - result = (Particle *)new Particle(arg1,(IFormFactor const &)*arg2); + { + try { + result = (Particle *)new Particle(arg1,(IFormFactor const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Particle, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34649,7 +37589,17 @@ SWIGINTERN PyObject *_wrap_delete_Particle(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Particle" "', argument " "1"" of type '" "Particle *""'"); } arg1 = reinterpret_cast< Particle * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34672,7 +37622,17 @@ SWIGINTERN PyObject *_wrap_Particle_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Particle_clone" "', argument " "1"" of type '" "Particle const *""'"); } arg1 = reinterpret_cast< Particle * >(argp1); - result = (Particle *)((Particle const *)arg1)->clone(); + { + try { + result = (Particle *)((Particle const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Particle, 0 | 0 ); return resultobj; fail: @@ -34695,7 +37655,17 @@ SWIGINTERN PyObject *_wrap_Particle_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Particle_className" "', argument " "1"" of type '" "Particle const *""'"); } arg1 = reinterpret_cast< Particle * >(argp1); - result = ((Particle const *)arg1)->className(); + { + try { + result = ((Particle const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34719,7 +37689,17 @@ SWIGINTERN PyObject *_wrap_new_Compound(PyObject *self, PyObject *args) { Compound *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_Compound", 0, 0, 0)) SWIG_fail; - result = (Compound *)new Compound(); + { + try { + result = (Compound *)new Compound(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Compound, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34741,7 +37721,17 @@ SWIGINTERN PyObject *_wrap_delete_Compound(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Compound" "', argument " "1"" of type '" "Compound *""'"); } arg1 = reinterpret_cast< Compound * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34764,7 +37754,17 @@ SWIGINTERN PyObject *_wrap_Compound_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compound_clone" "', argument " "1"" of type '" "Compound const *""'"); } arg1 = reinterpret_cast< Compound * >(argp1); - result = (Compound *)((Compound const *)arg1)->clone(); + { + try { + result = (Compound *)((Compound const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Compound, 0 | 0 ); return resultobj; fail: @@ -34787,7 +37787,17 @@ SWIGINTERN PyObject *_wrap_Compound_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compound_className" "', argument " "1"" of type '" "Compound const *""'"); } arg1 = reinterpret_cast< Compound * >(argp1); - result = ((Compound const *)arg1)->className(); + { + try { + result = ((Compound const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34810,7 +37820,17 @@ SWIGINTERN PyObject *_wrap_Compound_nodeChildren(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compound_nodeChildren" "', argument " "1"" of type '" "Compound const *""'"); } arg1 = reinterpret_cast< Compound * >(argp1); - result = ((Compound const *)arg1)->nodeChildren(); + { + try { + result = ((Compound const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -34841,7 +37861,17 @@ SWIGINTERN PyObject *_wrap_Compound_addComponent__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compound_addComponent" "', argument " "2"" of type '" "IParticle const &""'"); } arg2 = reinterpret_cast< IParticle * >(argp2); - (arg1)->addComponent((IParticle const &)*arg2); + { + try { + (arg1)->addComponent((IParticle const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34888,7 +37918,17 @@ SWIGINTERN PyObject *_wrap_Compound_addComponent__SWIG_1(PyObject *self, Py_ssiz if (SWIG_IsNewObj(res3)) delete temp; } } - (arg1)->addComponent((IParticle const &)*arg2,arg3); + { + try { + (arg1)->addComponent((IParticle const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34978,7 +38018,17 @@ SWIGINTERN PyObject *_wrap_Compound_addComponents(PyObject *self, PyObject *args arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - (arg1)->addComponents((IParticle const &)*arg2,arg3); + { + try { + (arg1)->addComponents((IParticle const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35040,7 +38090,17 @@ SWIGINTERN PyObject *_wrap_new_CoreAndShell__SWIG_0(PyObject *self, Py_ssize_t n if (SWIG_IsNewObj(res3)) delete temp; } } - result = (CoreAndShell *)new CoreAndShell((Particle const &)*arg1,(Particle const &)*arg2,arg3); + { + try { + result = (CoreAndShell *)new CoreAndShell((Particle const &)*arg1,(Particle const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CoreAndShell, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35075,7 +38135,17 @@ SWIGINTERN PyObject *_wrap_new_CoreAndShell__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CoreAndShell" "', argument " "2"" of type '" "Particle const &""'"); } arg2 = reinterpret_cast< Particle * >(argp2); - result = (CoreAndShell *)new CoreAndShell((Particle const &)*arg1,(Particle const &)*arg2); + { + try { + result = (CoreAndShell *)new CoreAndShell((Particle const &)*arg1,(Particle const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CoreAndShell, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35143,7 +38213,17 @@ SWIGINTERN PyObject *_wrap_delete_CoreAndShell(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoreAndShell" "', argument " "1"" of type '" "CoreAndShell *""'"); } arg1 = reinterpret_cast< CoreAndShell * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35166,7 +38246,17 @@ SWIGINTERN PyObject *_wrap_CoreAndShell_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreAndShell_clone" "', argument " "1"" of type '" "CoreAndShell const *""'"); } arg1 = reinterpret_cast< CoreAndShell * >(argp1); - result = (CoreAndShell *)((CoreAndShell const *)arg1)->clone(); + { + try { + result = (CoreAndShell *)((CoreAndShell const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CoreAndShell, 0 | 0 ); return resultobj; fail: @@ -35189,7 +38279,17 @@ SWIGINTERN PyObject *_wrap_CoreAndShell_className(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreAndShell_className" "', argument " "1"" of type '" "CoreAndShell const *""'"); } arg1 = reinterpret_cast< CoreAndShell * >(argp1); - result = ((CoreAndShell const *)arg1)->className(); + { + try { + result = ((CoreAndShell const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -35223,7 +38323,17 @@ SWIGINTERN PyObject *_wrap_IProfile1D_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile1D_clone" "', argument " "1"" of type '" "IProfile1D const *""'"); } arg1 = reinterpret_cast< IProfile1D * >(argp1); - result = (IProfile1D *)((IProfile1D const *)arg1)->clone(); + { + try { + result = (IProfile1D *)((IProfile1D const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IProfile1D, 0 | 0 ); return resultobj; fail: @@ -35246,7 +38356,17 @@ SWIGINTERN PyObject *_wrap_IProfile1D_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile1D_parDefs" "', argument " "1"" of type '" "IProfile1D const *""'"); } arg1 = reinterpret_cast< IProfile1D * >(argp1); - result = ((IProfile1D const *)arg1)->parDefs(); + { + try { + result = ((IProfile1D const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -35276,7 +38396,17 @@ SWIGINTERN PyObject *_wrap_IProfile1D_standardizedFT(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IProfile1D_standardizedFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((IProfile1D const *)arg1)->standardizedFT(arg2); + { + try { + result = (double)((IProfile1D const *)arg1)->standardizedFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35306,7 +38436,17 @@ SWIGINTERN PyObject *_wrap_IProfile1D_decayFT(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IProfile1D_decayFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((IProfile1D const *)arg1)->decayFT(arg2); + { + try { + result = (double)((IProfile1D const *)arg1)->decayFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35329,7 +38469,17 @@ SWIGINTERN PyObject *_wrap_IProfile1D_omega(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile1D_omega" "', argument " "1"" of type '" "IProfile1D const *""'"); } arg1 = reinterpret_cast< IProfile1D * >(argp1); - result = (double)((IProfile1D const *)arg1)->omega(); + { + try { + result = (double)((IProfile1D const *)arg1)->omega(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35352,7 +38502,17 @@ SWIGINTERN PyObject *_wrap_IProfile1D_decayLength(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile1D_decayLength" "', argument " "1"" of type '" "IProfile1D const *""'"); } arg1 = reinterpret_cast< IProfile1D * >(argp1); - result = (double)((IProfile1D const *)arg1)->decayLength(); + { + try { + result = (double)((IProfile1D const *)arg1)->decayLength(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35375,7 +38535,17 @@ SWIGINTERN PyObject *_wrap_IProfile1D_qSecondDerivative(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile1D_qSecondDerivative" "', argument " "1"" of type '" "IProfile1D const *""'"); } arg1 = reinterpret_cast< IProfile1D * >(argp1); - result = (double)((IProfile1D const *)arg1)->qSecondDerivative(); + { + try { + result = (double)((IProfile1D const *)arg1)->qSecondDerivative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35398,7 +38568,17 @@ SWIGINTERN PyObject *_wrap_IProfile1D_validate(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile1D_validate" "', argument " "1"" of type '" "IProfile1D const *""'"); } arg1 = reinterpret_cast< IProfile1D * >(argp1); - result = ((IProfile1D const *)arg1)->validate(); + { + try { + result = ((IProfile1D const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -35420,7 +38600,17 @@ SWIGINTERN PyObject *_wrap_delete_IProfile1D(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IProfile1D" "', argument " "1"" of type '" "IProfile1D *""'"); } arg1 = reinterpret_cast< IProfile1D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35450,7 +38640,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DCauchy__SWIG_0(PyObject *self, Py_ssize_ arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile1DCauchy *)new Profile1DCauchy(arg1); + { + try { + result = (Profile1DCauchy *)new Profile1DCauchy(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DCauchy, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35471,7 +38671,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DCauchy__SWIG_1(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Profile1DCauchy" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (Profile1DCauchy *)new Profile1DCauchy(arg1); + { + try { + result = (Profile1DCauchy *)new Profile1DCauchy(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DCauchy, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35530,7 +38740,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCauchy_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DCauchy_clone" "', argument " "1"" of type '" "Profile1DCauchy const *""'"); } arg1 = reinterpret_cast< Profile1DCauchy * >(argp1); - result = (Profile1DCauchy *)((Profile1DCauchy const *)arg1)->clone(); + { + try { + result = (Profile1DCauchy *)((Profile1DCauchy const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DCauchy, 0 | 0 ); return resultobj; fail: @@ -35553,7 +38773,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCauchy_className(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DCauchy_className" "', argument " "1"" of type '" "Profile1DCauchy const *""'"); } arg1 = reinterpret_cast< Profile1DCauchy * >(argp1); - result = ((Profile1DCauchy const *)arg1)->className(); + { + try { + result = ((Profile1DCauchy const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -35583,7 +38813,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCauchy_standardizedFT(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DCauchy_standardizedFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DCauchy const *)arg1)->standardizedFT(arg2); + { + try { + result = (double)((Profile1DCauchy const *)arg1)->standardizedFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35613,7 +38853,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCauchy_decayFT(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DCauchy_decayFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DCauchy const *)arg1)->decayFT(arg2); + { + try { + result = (double)((Profile1DCauchy const *)arg1)->decayFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35636,7 +38886,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCauchy_qSecondDerivative(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DCauchy_qSecondDerivative" "', argument " "1"" of type '" "Profile1DCauchy const *""'"); } arg1 = reinterpret_cast< Profile1DCauchy * >(argp1); - result = (double)((Profile1DCauchy const *)arg1)->qSecondDerivative(); + { + try { + result = (double)((Profile1DCauchy const *)arg1)->qSecondDerivative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35658,7 +38918,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile1DCauchy(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile1DCauchy" "', argument " "1"" of type '" "Profile1DCauchy *""'"); } arg1 = reinterpret_cast< Profile1DCauchy * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35692,7 +38962,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DGauss__SWIG_0(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile1DGauss *)new Profile1DGauss(arg1); + { + try { + result = (Profile1DGauss *)new Profile1DGauss(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35713,7 +38993,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DGauss__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Profile1DGauss" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (Profile1DGauss *)new Profile1DGauss(arg1); + { + try { + result = (Profile1DGauss *)new Profile1DGauss(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35772,7 +39062,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGauss_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DGauss_clone" "', argument " "1"" of type '" "Profile1DGauss const *""'"); } arg1 = reinterpret_cast< Profile1DGauss * >(argp1); - result = (Profile1DGauss *)((Profile1DGauss const *)arg1)->clone(); + { + try { + result = (Profile1DGauss *)((Profile1DGauss const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DGauss, 0 | 0 ); return resultobj; fail: @@ -35795,7 +39095,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGauss_className(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DGauss_className" "', argument " "1"" of type '" "Profile1DGauss const *""'"); } arg1 = reinterpret_cast< Profile1DGauss * >(argp1); - result = ((Profile1DGauss const *)arg1)->className(); + { + try { + result = ((Profile1DGauss const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -35825,7 +39135,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGauss_standardizedFT(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DGauss_standardizedFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DGauss const *)arg1)->standardizedFT(arg2); + { + try { + result = (double)((Profile1DGauss const *)arg1)->standardizedFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35855,7 +39175,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGauss_decayFT(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DGauss_decayFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DGauss const *)arg1)->decayFT(arg2); + { + try { + result = (double)((Profile1DGauss const *)arg1)->decayFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35878,7 +39208,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGauss_qSecondDerivative(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DGauss_qSecondDerivative" "', argument " "1"" of type '" "Profile1DGauss const *""'"); } arg1 = reinterpret_cast< Profile1DGauss * >(argp1); - result = (double)((Profile1DGauss const *)arg1)->qSecondDerivative(); + { + try { + result = (double)((Profile1DGauss const *)arg1)->qSecondDerivative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35900,7 +39240,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile1DGauss(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile1DGauss" "', argument " "1"" of type '" "Profile1DGauss *""'"); } arg1 = reinterpret_cast< Profile1DGauss * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35934,7 +39284,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DGate__SWIG_0(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile1DGate *)new Profile1DGate(arg1); + { + try { + result = (Profile1DGate *)new Profile1DGate(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DGate, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35955,7 +39315,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DGate__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Profile1DGate" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (Profile1DGate *)new Profile1DGate(arg1); + { + try { + result = (Profile1DGate *)new Profile1DGate(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DGate, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36014,7 +39384,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGate_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DGate_clone" "', argument " "1"" of type '" "Profile1DGate const *""'"); } arg1 = reinterpret_cast< Profile1DGate * >(argp1); - result = (Profile1DGate *)((Profile1DGate const *)arg1)->clone(); + { + try { + result = (Profile1DGate *)((Profile1DGate const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DGate, 0 | 0 ); return resultobj; fail: @@ -36037,7 +39417,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGate_className(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DGate_className" "', argument " "1"" of type '" "Profile1DGate const *""'"); } arg1 = reinterpret_cast< Profile1DGate * >(argp1); - result = ((Profile1DGate const *)arg1)->className(); + { + try { + result = ((Profile1DGate const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -36067,7 +39457,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGate_standardizedFT(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DGate_standardizedFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DGate const *)arg1)->standardizedFT(arg2); + { + try { + result = (double)((Profile1DGate const *)arg1)->standardizedFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36097,7 +39497,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGate_decayFT(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DGate_decayFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DGate const *)arg1)->decayFT(arg2); + { + try { + result = (double)((Profile1DGate const *)arg1)->decayFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36120,7 +39530,17 @@ SWIGINTERN PyObject *_wrap_Profile1DGate_qSecondDerivative(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DGate_qSecondDerivative" "', argument " "1"" of type '" "Profile1DGate const *""'"); } arg1 = reinterpret_cast< Profile1DGate * >(argp1); - result = (double)((Profile1DGate const *)arg1)->qSecondDerivative(); + { + try { + result = (double)((Profile1DGate const *)arg1)->qSecondDerivative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36142,7 +39562,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile1DGate(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile1DGate" "', argument " "1"" of type '" "Profile1DGate *""'"); } arg1 = reinterpret_cast< Profile1DGate * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -36176,7 +39606,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DTriangle__SWIG_0(PyObject *self, Py_ssiz arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile1DTriangle *)new Profile1DTriangle(arg1); + { + try { + result = (Profile1DTriangle *)new Profile1DTriangle(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DTriangle, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36197,7 +39637,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DTriangle__SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Profile1DTriangle" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (Profile1DTriangle *)new Profile1DTriangle(arg1); + { + try { + result = (Profile1DTriangle *)new Profile1DTriangle(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DTriangle, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36256,7 +39706,17 @@ SWIGINTERN PyObject *_wrap_Profile1DTriangle_clone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DTriangle_clone" "', argument " "1"" of type '" "Profile1DTriangle const *""'"); } arg1 = reinterpret_cast< Profile1DTriangle * >(argp1); - result = (Profile1DTriangle *)((Profile1DTriangle const *)arg1)->clone(); + { + try { + result = (Profile1DTriangle *)((Profile1DTriangle const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DTriangle, 0 | 0 ); return resultobj; fail: @@ -36279,7 +39739,17 @@ SWIGINTERN PyObject *_wrap_Profile1DTriangle_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DTriangle_className" "', argument " "1"" of type '" "Profile1DTriangle const *""'"); } arg1 = reinterpret_cast< Profile1DTriangle * >(argp1); - result = ((Profile1DTriangle const *)arg1)->className(); + { + try { + result = ((Profile1DTriangle const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -36309,7 +39779,17 @@ SWIGINTERN PyObject *_wrap_Profile1DTriangle_standardizedFT(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DTriangle_standardizedFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DTriangle const *)arg1)->standardizedFT(arg2); + { + try { + result = (double)((Profile1DTriangle const *)arg1)->standardizedFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36339,7 +39819,17 @@ SWIGINTERN PyObject *_wrap_Profile1DTriangle_decayFT(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DTriangle_decayFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DTriangle const *)arg1)->decayFT(arg2); + { + try { + result = (double)((Profile1DTriangle const *)arg1)->decayFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36362,7 +39852,17 @@ SWIGINTERN PyObject *_wrap_Profile1DTriangle_qSecondDerivative(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DTriangle_qSecondDerivative" "', argument " "1"" of type '" "Profile1DTriangle const *""'"); } arg1 = reinterpret_cast< Profile1DTriangle * >(argp1); - result = (double)((Profile1DTriangle const *)arg1)->qSecondDerivative(); + { + try { + result = (double)((Profile1DTriangle const *)arg1)->qSecondDerivative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36384,7 +39884,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile1DTriangle(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile1DTriangle" "', argument " "1"" of type '" "Profile1DTriangle *""'"); } arg1 = reinterpret_cast< Profile1DTriangle * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -36418,7 +39928,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DCosine__SWIG_0(PyObject *self, Py_ssize_ arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile1DCosine *)new Profile1DCosine(arg1); + { + try { + result = (Profile1DCosine *)new Profile1DCosine(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DCosine, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36439,7 +39959,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DCosine__SWIG_1(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Profile1DCosine" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (Profile1DCosine *)new Profile1DCosine(arg1); + { + try { + result = (Profile1DCosine *)new Profile1DCosine(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DCosine, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36498,7 +40028,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCosine_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DCosine_clone" "', argument " "1"" of type '" "Profile1DCosine const *""'"); } arg1 = reinterpret_cast< Profile1DCosine * >(argp1); - result = (Profile1DCosine *)((Profile1DCosine const *)arg1)->clone(); + { + try { + result = (Profile1DCosine *)((Profile1DCosine const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DCosine, 0 | 0 ); return resultobj; fail: @@ -36521,7 +40061,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCosine_className(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DCosine_className" "', argument " "1"" of type '" "Profile1DCosine const *""'"); } arg1 = reinterpret_cast< Profile1DCosine * >(argp1); - result = ((Profile1DCosine const *)arg1)->className(); + { + try { + result = ((Profile1DCosine const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -36551,7 +40101,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCosine_standardizedFT(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DCosine_standardizedFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DCosine const *)arg1)->standardizedFT(arg2); + { + try { + result = (double)((Profile1DCosine const *)arg1)->standardizedFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36581,7 +40141,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCosine_decayFT(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DCosine_decayFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DCosine const *)arg1)->decayFT(arg2); + { + try { + result = (double)((Profile1DCosine const *)arg1)->decayFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36604,7 +40174,17 @@ SWIGINTERN PyObject *_wrap_Profile1DCosine_qSecondDerivative(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DCosine_qSecondDerivative" "', argument " "1"" of type '" "Profile1DCosine const *""'"); } arg1 = reinterpret_cast< Profile1DCosine * >(argp1); - result = (double)((Profile1DCosine const *)arg1)->qSecondDerivative(); + { + try { + result = (double)((Profile1DCosine const *)arg1)->qSecondDerivative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36626,7 +40206,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile1DCosine(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile1DCosine" "', argument " "1"" of type '" "Profile1DCosine *""'"); } arg1 = reinterpret_cast< Profile1DCosine * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -36660,7 +40250,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DVoigt__SWIG_0(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile1DVoigt *)new Profile1DVoigt(arg1); + { + try { + result = (Profile1DVoigt *)new Profile1DVoigt(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DVoigt, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36689,7 +40289,17 @@ SWIGINTERN PyObject *_wrap_new_Profile1DVoigt__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Profile1DVoigt" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Profile1DVoigt *)new Profile1DVoigt(arg1,arg2); + { + try { + result = (Profile1DVoigt *)new Profile1DVoigt(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DVoigt, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -36754,7 +40364,17 @@ SWIGINTERN PyObject *_wrap_Profile1DVoigt_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DVoigt_clone" "', argument " "1"" of type '" "Profile1DVoigt const *""'"); } arg1 = reinterpret_cast< Profile1DVoigt * >(argp1); - result = (Profile1DVoigt *)((Profile1DVoigt const *)arg1)->clone(); + { + try { + result = (Profile1DVoigt *)((Profile1DVoigt const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile1DVoigt, 0 | 0 ); return resultobj; fail: @@ -36777,7 +40397,17 @@ SWIGINTERN PyObject *_wrap_Profile1DVoigt_className(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DVoigt_className" "', argument " "1"" of type '" "Profile1DVoigt const *""'"); } arg1 = reinterpret_cast< Profile1DVoigt * >(argp1); - result = ((Profile1DVoigt const *)arg1)->className(); + { + try { + result = ((Profile1DVoigt const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -36800,7 +40430,17 @@ SWIGINTERN PyObject *_wrap_Profile1DVoigt_parDefs(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DVoigt_parDefs" "', argument " "1"" of type '" "Profile1DVoigt const *""'"); } arg1 = reinterpret_cast< Profile1DVoigt * >(argp1); - result = ((Profile1DVoigt const *)arg1)->parDefs(); + { + try { + result = ((Profile1DVoigt const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -36830,7 +40470,17 @@ SWIGINTERN PyObject *_wrap_Profile1DVoigt_standardizedFT(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DVoigt_standardizedFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DVoigt const *)arg1)->standardizedFT(arg2); + { + try { + result = (double)((Profile1DVoigt const *)arg1)->standardizedFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36860,7 +40510,17 @@ SWIGINTERN PyObject *_wrap_Profile1DVoigt_decayFT(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Profile1DVoigt_decayFT" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((Profile1DVoigt const *)arg1)->decayFT(arg2); + { + try { + result = (double)((Profile1DVoigt const *)arg1)->decayFT(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36883,7 +40543,17 @@ SWIGINTERN PyObject *_wrap_Profile1DVoigt_eta(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DVoigt_eta" "', argument " "1"" of type '" "Profile1DVoigt const *""'"); } arg1 = reinterpret_cast< Profile1DVoigt * >(argp1); - result = (double)((Profile1DVoigt const *)arg1)->eta(); + { + try { + result = (double)((Profile1DVoigt const *)arg1)->eta(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36906,7 +40576,17 @@ SWIGINTERN PyObject *_wrap_Profile1DVoigt_qSecondDerivative(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DVoigt_qSecondDerivative" "', argument " "1"" of type '" "Profile1DVoigt const *""'"); } arg1 = reinterpret_cast< Profile1DVoigt * >(argp1); - result = (double)((Profile1DVoigt const *)arg1)->qSecondDerivative(); + { + try { + result = (double)((Profile1DVoigt const *)arg1)->qSecondDerivative(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -36929,7 +40609,17 @@ SWIGINTERN PyObject *_wrap_Profile1DVoigt_validate(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile1DVoigt_validate" "', argument " "1"" of type '" "Profile1DVoigt const *""'"); } arg1 = reinterpret_cast< Profile1DVoigt * >(argp1); - result = ((Profile1DVoigt const *)arg1)->validate(); + { + try { + result = ((Profile1DVoigt const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -36951,7 +40641,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile1DVoigt(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile1DVoigt" "', argument " "1"" of type '" "Profile1DVoigt *""'"); } arg1 = reinterpret_cast< Profile1DVoigt * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -36985,7 +40685,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile2D_clone" "', argument " "1"" of type '" "IProfile2D const *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - result = (IProfile2D *)((IProfile2D const *)arg1)->clone(); + { + try { + result = (IProfile2D *)((IProfile2D const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IProfile2D, 0 | 0 ); return resultobj; fail: @@ -37008,7 +40718,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile2D_parDefs" "', argument " "1"" of type '" "IProfile2D const *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - result = ((IProfile2D const *)arg1)->parDefs(); + { + try { + result = ((IProfile2D const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -37031,7 +40751,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_omegaX(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile2D_omegaX" "', argument " "1"" of type '" "IProfile2D const *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - result = (double)((IProfile2D const *)arg1)->omegaX(); + { + try { + result = (double)((IProfile2D const *)arg1)->omegaX(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37054,7 +40784,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_omegaY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile2D_omegaY" "', argument " "1"" of type '" "IProfile2D const *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - result = (double)((IProfile2D const *)arg1)->omegaY(); + { + try { + result = (double)((IProfile2D const *)arg1)->omegaY(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37077,7 +40817,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_decayLengthX(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile2D_decayLengthX" "', argument " "1"" of type '" "IProfile2D const *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - result = (double)((IProfile2D const *)arg1)->decayLengthX(); + { + try { + result = (double)((IProfile2D const *)arg1)->decayLengthX(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37100,7 +40850,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_decayLengthY(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile2D_decayLengthY" "', argument " "1"" of type '" "IProfile2D const *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - result = (double)((IProfile2D const *)arg1)->decayLengthY(); + { + try { + result = (double)((IProfile2D const *)arg1)->decayLengthY(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37123,7 +40883,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_gamma(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile2D_gamma" "', argument " "1"" of type '" "IProfile2D const *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - result = (double)((IProfile2D const *)arg1)->gamma(); + { + try { + result = (double)((IProfile2D const *)arg1)->gamma(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37146,7 +40916,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_delta(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile2D_delta" "', argument " "1"" of type '" "IProfile2D const *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - result = (double)((IProfile2D const *)arg1)->delta(); + { + try { + result = (double)((IProfile2D const *)arg1)->delta(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37184,7 +40964,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_standardizedFT2D(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IProfile2D_standardizedFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((IProfile2D const *)arg1)->standardizedFT2D(arg2,arg3); + { + try { + result = (double)((IProfile2D const *)arg1)->standardizedFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37222,7 +41012,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_decayFT2D(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IProfile2D_decayFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((IProfile2D const *)arg1)->decayFT2D(arg2,arg3); + { + try { + result = (double)((IProfile2D const *)arg1)->decayFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37245,7 +41045,17 @@ SWIGINTERN PyObject *_wrap_IProfile2D_validate(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfile2D_validate" "', argument " "1"" of type '" "IProfile2D const *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - result = ((IProfile2D const *)arg1)->validate(); + { + try { + result = ((IProfile2D const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -37267,7 +41077,17 @@ SWIGINTERN PyObject *_wrap_delete_IProfile2D(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IProfile2D" "', argument " "1"" of type '" "IProfile2D *""'"); } arg1 = reinterpret_cast< IProfile2D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -37297,7 +41117,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DCauchy__SWIG_0(PyObject *self, Py_ssize_ arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile2DCauchy *)new Profile2DCauchy(arg1); + { + try { + result = (Profile2DCauchy *)new Profile2DCauchy(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DCauchy, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37334,7 +41164,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DCauchy__SWIG_1(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Profile2DCauchy" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Profile2DCauchy *)new Profile2DCauchy(arg1,arg2,arg3); + { + try { + result = (Profile2DCauchy *)new Profile2DCauchy(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DCauchy, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37405,7 +41245,17 @@ SWIGINTERN PyObject *_wrap_Profile2DCauchy_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DCauchy_clone" "', argument " "1"" of type '" "Profile2DCauchy const *""'"); } arg1 = reinterpret_cast< Profile2DCauchy * >(argp1); - result = (Profile2DCauchy *)((Profile2DCauchy const *)arg1)->clone(); + { + try { + result = (Profile2DCauchy *)((Profile2DCauchy const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DCauchy, 0 | 0 ); return resultobj; fail: @@ -37428,7 +41278,17 @@ SWIGINTERN PyObject *_wrap_Profile2DCauchy_className(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DCauchy_className" "', argument " "1"" of type '" "Profile2DCauchy const *""'"); } arg1 = reinterpret_cast< Profile2DCauchy * >(argp1); - result = ((Profile2DCauchy const *)arg1)->className(); + { + try { + result = ((Profile2DCauchy const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -37466,7 +41326,17 @@ SWIGINTERN PyObject *_wrap_Profile2DCauchy_standardizedFT2D(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DCauchy_standardizedFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DCauchy const *)arg1)->standardizedFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DCauchy const *)arg1)->standardizedFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37504,7 +41374,17 @@ SWIGINTERN PyObject *_wrap_Profile2DCauchy_decayFT2D(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DCauchy_decayFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DCauchy const *)arg1)->decayFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DCauchy const *)arg1)->decayFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37526,7 +41406,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile2DCauchy(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile2DCauchy" "', argument " "1"" of type '" "Profile2DCauchy *""'"); } arg1 = reinterpret_cast< Profile2DCauchy * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -37560,7 +41450,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DGauss__SWIG_0(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile2DGauss *)new Profile2DGauss(arg1); + { + try { + result = (Profile2DGauss *)new Profile2DGauss(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37597,7 +41497,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DGauss__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Profile2DGauss" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Profile2DGauss *)new Profile2DGauss(arg1,arg2,arg3); + { + try { + result = (Profile2DGauss *)new Profile2DGauss(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37668,7 +41578,17 @@ SWIGINTERN PyObject *_wrap_Profile2DGauss_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DGauss_clone" "', argument " "1"" of type '" "Profile2DGauss const *""'"); } arg1 = reinterpret_cast< Profile2DGauss * >(argp1); - result = (Profile2DGauss *)((Profile2DGauss const *)arg1)->clone(); + { + try { + result = (Profile2DGauss *)((Profile2DGauss const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DGauss, 0 | 0 ); return resultobj; fail: @@ -37691,7 +41611,17 @@ SWIGINTERN PyObject *_wrap_Profile2DGauss_className(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DGauss_className" "', argument " "1"" of type '" "Profile2DGauss const *""'"); } arg1 = reinterpret_cast< Profile2DGauss * >(argp1); - result = ((Profile2DGauss const *)arg1)->className(); + { + try { + result = ((Profile2DGauss const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -37729,7 +41659,17 @@ SWIGINTERN PyObject *_wrap_Profile2DGauss_standardizedFT2D(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DGauss_standardizedFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DGauss const *)arg1)->standardizedFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DGauss const *)arg1)->standardizedFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37767,7 +41707,17 @@ SWIGINTERN PyObject *_wrap_Profile2DGauss_decayFT2D(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DGauss_decayFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DGauss const *)arg1)->decayFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DGauss const *)arg1)->decayFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -37789,7 +41739,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile2DGauss(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile2DGauss" "', argument " "1"" of type '" "Profile2DGauss *""'"); } arg1 = reinterpret_cast< Profile2DGauss * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -37823,7 +41783,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DGate__SWIG_0(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile2DGate *)new Profile2DGate(arg1); + { + try { + result = (Profile2DGate *)new Profile2DGate(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DGate, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37860,7 +41830,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DGate__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Profile2DGate" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Profile2DGate *)new Profile2DGate(arg1,arg2,arg3); + { + try { + result = (Profile2DGate *)new Profile2DGate(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DGate, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -37931,7 +41911,17 @@ SWIGINTERN PyObject *_wrap_Profile2DGate_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DGate_clone" "', argument " "1"" of type '" "Profile2DGate const *""'"); } arg1 = reinterpret_cast< Profile2DGate * >(argp1); - result = (Profile2DGate *)((Profile2DGate const *)arg1)->clone(); + { + try { + result = (Profile2DGate *)((Profile2DGate const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DGate, 0 | 0 ); return resultobj; fail: @@ -37954,7 +41944,17 @@ SWIGINTERN PyObject *_wrap_Profile2DGate_className(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DGate_className" "', argument " "1"" of type '" "Profile2DGate const *""'"); } arg1 = reinterpret_cast< Profile2DGate * >(argp1); - result = ((Profile2DGate const *)arg1)->className(); + { + try { + result = ((Profile2DGate const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -37992,7 +41992,17 @@ SWIGINTERN PyObject *_wrap_Profile2DGate_standardizedFT2D(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DGate_standardizedFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DGate const *)arg1)->standardizedFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DGate const *)arg1)->standardizedFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -38030,7 +42040,17 @@ SWIGINTERN PyObject *_wrap_Profile2DGate_decayFT2D(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DGate_decayFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DGate const *)arg1)->decayFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DGate const *)arg1)->decayFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -38052,7 +42072,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile2DGate(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile2DGate" "', argument " "1"" of type '" "Profile2DGate *""'"); } arg1 = reinterpret_cast< Profile2DGate * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -38086,7 +42116,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DCone__SWIG_0(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile2DCone *)new Profile2DCone(arg1); + { + try { + result = (Profile2DCone *)new Profile2DCone(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DCone, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -38123,7 +42163,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DCone__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Profile2DCone" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Profile2DCone *)new Profile2DCone(arg1,arg2,arg3); + { + try { + result = (Profile2DCone *)new Profile2DCone(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DCone, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -38194,7 +42244,17 @@ SWIGINTERN PyObject *_wrap_Profile2DCone_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DCone_clone" "', argument " "1"" of type '" "Profile2DCone const *""'"); } arg1 = reinterpret_cast< Profile2DCone * >(argp1); - result = (Profile2DCone *)((Profile2DCone const *)arg1)->clone(); + { + try { + result = (Profile2DCone *)((Profile2DCone const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DCone, 0 | 0 ); return resultobj; fail: @@ -38217,7 +42277,17 @@ SWIGINTERN PyObject *_wrap_Profile2DCone_className(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DCone_className" "', argument " "1"" of type '" "Profile2DCone const *""'"); } arg1 = reinterpret_cast< Profile2DCone * >(argp1); - result = ((Profile2DCone const *)arg1)->className(); + { + try { + result = ((Profile2DCone const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -38255,7 +42325,17 @@ SWIGINTERN PyObject *_wrap_Profile2DCone_standardizedFT2D(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DCone_standardizedFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DCone const *)arg1)->standardizedFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DCone const *)arg1)->standardizedFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -38293,7 +42373,17 @@ SWIGINTERN PyObject *_wrap_Profile2DCone_decayFT2D(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DCone_decayFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DCone const *)arg1)->decayFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DCone const *)arg1)->decayFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -38315,7 +42405,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile2DCone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile2DCone" "', argument " "1"" of type '" "Profile2DCone *""'"); } arg1 = reinterpret_cast< Profile2DCone * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -38349,7 +42449,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DVoigt__SWIG_0(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Profile2DVoigt *)new Profile2DVoigt(arg1); + { + try { + result = (Profile2DVoigt *)new Profile2DVoigt(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DVoigt, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -38394,7 +42504,17 @@ SWIGINTERN PyObject *_wrap_new_Profile2DVoigt__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Profile2DVoigt" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (Profile2DVoigt *)new Profile2DVoigt(arg1,arg2,arg3,arg4); + { + try { + result = (Profile2DVoigt *)new Profile2DVoigt(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DVoigt, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -38471,7 +42591,17 @@ SWIGINTERN PyObject *_wrap_Profile2DVoigt_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DVoigt_clone" "', argument " "1"" of type '" "Profile2DVoigt const *""'"); } arg1 = reinterpret_cast< Profile2DVoigt * >(argp1); - result = (Profile2DVoigt *)((Profile2DVoigt const *)arg1)->clone(); + { + try { + result = (Profile2DVoigt *)((Profile2DVoigt const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Profile2DVoigt, 0 | 0 ); return resultobj; fail: @@ -38494,7 +42624,17 @@ SWIGINTERN PyObject *_wrap_Profile2DVoigt_className(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DVoigt_className" "', argument " "1"" of type '" "Profile2DVoigt const *""'"); } arg1 = reinterpret_cast< Profile2DVoigt * >(argp1); - result = ((Profile2DVoigt const *)arg1)->className(); + { + try { + result = ((Profile2DVoigt const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -38517,7 +42657,17 @@ SWIGINTERN PyObject *_wrap_Profile2DVoigt_parDefs(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DVoigt_parDefs" "', argument " "1"" of type '" "Profile2DVoigt const *""'"); } arg1 = reinterpret_cast< Profile2DVoigt * >(argp1); - result = ((Profile2DVoigt const *)arg1)->parDefs(); + { + try { + result = ((Profile2DVoigt const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -38555,7 +42705,17 @@ SWIGINTERN PyObject *_wrap_Profile2DVoigt_standardizedFT2D(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DVoigt_standardizedFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DVoigt const *)arg1)->standardizedFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DVoigt const *)arg1)->standardizedFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -38593,7 +42753,17 @@ SWIGINTERN PyObject *_wrap_Profile2DVoigt_decayFT2D(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Profile2DVoigt_decayFT2D" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Profile2DVoigt const *)arg1)->decayFT2D(arg2,arg3); + { + try { + result = (double)((Profile2DVoigt const *)arg1)->decayFT2D(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -38616,7 +42786,17 @@ SWIGINTERN PyObject *_wrap_Profile2DVoigt_eta(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DVoigt_eta" "', argument " "1"" of type '" "Profile2DVoigt const *""'"); } arg1 = reinterpret_cast< Profile2DVoigt * >(argp1); - result = (double)((Profile2DVoigt const *)arg1)->eta(); + { + try { + result = (double)((Profile2DVoigt const *)arg1)->eta(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -38639,7 +42819,17 @@ SWIGINTERN PyObject *_wrap_Profile2DVoigt_validate(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Profile2DVoigt_validate" "', argument " "1"" of type '" "Profile2DVoigt const *""'"); } arg1 = reinterpret_cast< Profile2DVoigt * >(argp1); - result = ((Profile2DVoigt const *)arg1)->validate(); + { + try { + result = ((Profile2DVoigt const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -38661,7 +42851,17 @@ SWIGINTERN PyObject *_wrap_delete_Profile2DVoigt(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Profile2DVoigt" "', argument " "1"" of type '" "Profile2DVoigt *""'"); } arg1 = reinterpret_cast< Profile2DVoigt * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -38694,7 +42894,17 @@ SWIGINTERN PyObject *_wrap_delete_IPeakShape(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IPeakShape" "', argument " "1"" of type '" "IPeakShape *""'"); } arg1 = reinterpret_cast< IPeakShape * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -38717,7 +42927,17 @@ SWIGINTERN PyObject *_wrap_IPeakShape_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IPeakShape_clone" "', argument " "1"" of type '" "IPeakShape const *""'"); } arg1 = reinterpret_cast< IPeakShape * >(argp1); - result = (IPeakShape *)((IPeakShape const *)arg1)->clone(); + { + try { + result = (IPeakShape *)((IPeakShape const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IPeakShape, 0 | 0 ); return resultobj; fail: @@ -38771,7 +42991,17 @@ SWIGINTERN PyObject *_wrap_IPeakShape_peakDistribution(PyObject *self, PyObject if (SWIG_IsNewObj(res3)) delete temp; } } - result = (double)((IPeakShape const *)arg1)->peakDistribution(arg2,arg3); + { + try { + result = (double)((IPeakShape const *)arg1)->peakDistribution(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -38794,7 +43024,17 @@ SWIGINTERN PyObject *_wrap_IPeakShape_angularDisorder(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IPeakShape_angularDisorder" "', argument " "1"" of type '" "IPeakShape const *""'"); } arg1 = reinterpret_cast< IPeakShape * >(argp1); - result = (bool)((IPeakShape const *)arg1)->angularDisorder(); + { + try { + result = (bool)((IPeakShape const *)arg1)->angularDisorder(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -38831,7 +43071,17 @@ SWIGINTERN PyObject *_wrap_new_IsotropicGaussPeakShape(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IsotropicGaussPeakShape" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (IsotropicGaussPeakShape *)new IsotropicGaussPeakShape(arg1,arg2); + { + try { + result = (IsotropicGaussPeakShape *)new IsotropicGaussPeakShape(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IsotropicGaussPeakShape, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -38853,7 +43103,17 @@ SWIGINTERN PyObject *_wrap_delete_IsotropicGaussPeakShape(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IsotropicGaussPeakShape" "', argument " "1"" of type '" "IsotropicGaussPeakShape *""'"); } arg1 = reinterpret_cast< IsotropicGaussPeakShape * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -38876,7 +43136,17 @@ SWIGINTERN PyObject *_wrap_IsotropicGaussPeakShape_clone(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsotropicGaussPeakShape_clone" "', argument " "1"" of type '" "IsotropicGaussPeakShape const *""'"); } arg1 = reinterpret_cast< IsotropicGaussPeakShape * >(argp1); - result = (IsotropicGaussPeakShape *)((IsotropicGaussPeakShape const *)arg1)->clone(); + { + try { + result = (IsotropicGaussPeakShape *)((IsotropicGaussPeakShape const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IsotropicGaussPeakShape, 0 | 0 ); return resultobj; fail: @@ -38899,7 +43169,17 @@ SWIGINTERN PyObject *_wrap_IsotropicGaussPeakShape_className(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsotropicGaussPeakShape_className" "', argument " "1"" of type '" "IsotropicGaussPeakShape const *""'"); } arg1 = reinterpret_cast< IsotropicGaussPeakShape * >(argp1); - result = ((IsotropicGaussPeakShape const *)arg1)->className(); + { + try { + result = ((IsotropicGaussPeakShape const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -38922,7 +43202,17 @@ SWIGINTERN PyObject *_wrap_IsotropicGaussPeakShape_parDefs(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsotropicGaussPeakShape_parDefs" "', argument " "1"" of type '" "IsotropicGaussPeakShape const *""'"); } arg1 = reinterpret_cast< IsotropicGaussPeakShape * >(argp1); - result = ((IsotropicGaussPeakShape const *)arg1)->parDefs(); + { + try { + result = ((IsotropicGaussPeakShape const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -38976,7 +43266,17 @@ SWIGINTERN PyObject *_wrap_IsotropicGaussPeakShape_peakDistribution(PyObject *se if (SWIG_IsNewObj(res3)) delete temp; } } - result = (double)((IsotropicGaussPeakShape const *)arg1)->peakDistribution(arg2,arg3); + { + try { + result = (double)((IsotropicGaussPeakShape const *)arg1)->peakDistribution(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -39017,7 +43317,17 @@ SWIGINTERN PyObject *_wrap_new_IsotropicLorentzPeakShape(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IsotropicLorentzPeakShape" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (IsotropicLorentzPeakShape *)new IsotropicLorentzPeakShape(arg1,arg2); + { + try { + result = (IsotropicLorentzPeakShape *)new IsotropicLorentzPeakShape(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IsotropicLorentzPeakShape, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -39039,7 +43349,17 @@ SWIGINTERN PyObject *_wrap_delete_IsotropicLorentzPeakShape(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IsotropicLorentzPeakShape" "', argument " "1"" of type '" "IsotropicLorentzPeakShape *""'"); } arg1 = reinterpret_cast< IsotropicLorentzPeakShape * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -39062,7 +43382,17 @@ SWIGINTERN PyObject *_wrap_IsotropicLorentzPeakShape_clone(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsotropicLorentzPeakShape_clone" "', argument " "1"" of type '" "IsotropicLorentzPeakShape const *""'"); } arg1 = reinterpret_cast< IsotropicLorentzPeakShape * >(argp1); - result = (IsotropicLorentzPeakShape *)((IsotropicLorentzPeakShape const *)arg1)->clone(); + { + try { + result = (IsotropicLorentzPeakShape *)((IsotropicLorentzPeakShape const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IsotropicLorentzPeakShape, 0 | 0 ); return resultobj; fail: @@ -39085,7 +43415,17 @@ SWIGINTERN PyObject *_wrap_IsotropicLorentzPeakShape_className(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsotropicLorentzPeakShape_className" "', argument " "1"" of type '" "IsotropicLorentzPeakShape const *""'"); } arg1 = reinterpret_cast< IsotropicLorentzPeakShape * >(argp1); - result = ((IsotropicLorentzPeakShape const *)arg1)->className(); + { + try { + result = ((IsotropicLorentzPeakShape const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -39108,7 +43448,17 @@ SWIGINTERN PyObject *_wrap_IsotropicLorentzPeakShape_parDefs(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsotropicLorentzPeakShape_parDefs" "', argument " "1"" of type '" "IsotropicLorentzPeakShape const *""'"); } arg1 = reinterpret_cast< IsotropicLorentzPeakShape * >(argp1); - result = ((IsotropicLorentzPeakShape const *)arg1)->parDefs(); + { + try { + result = ((IsotropicLorentzPeakShape const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -39162,7 +43512,17 @@ SWIGINTERN PyObject *_wrap_IsotropicLorentzPeakShape_peakDistribution(PyObject * if (SWIG_IsNewObj(res3)) delete temp; } } - result = (double)((IsotropicLorentzPeakShape const *)arg1)->peakDistribution(arg2,arg3); + { + try { + result = (double)((IsotropicLorentzPeakShape const *)arg1)->peakDistribution(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -39211,7 +43571,17 @@ SWIGINTERN PyObject *_wrap_new_GaussFisherPeakShape(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GaussFisherPeakShape" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (GaussFisherPeakShape *)new GaussFisherPeakShape(arg1,arg2,arg3); + { + try { + result = (GaussFisherPeakShape *)new GaussFisherPeakShape(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussFisherPeakShape, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -39233,7 +43603,17 @@ SWIGINTERN PyObject *_wrap_delete_GaussFisherPeakShape(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussFisherPeakShape" "', argument " "1"" of type '" "GaussFisherPeakShape *""'"); } arg1 = reinterpret_cast< GaussFisherPeakShape * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -39256,7 +43636,17 @@ SWIGINTERN PyObject *_wrap_GaussFisherPeakShape_clone(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussFisherPeakShape_clone" "', argument " "1"" of type '" "GaussFisherPeakShape const *""'"); } arg1 = reinterpret_cast< GaussFisherPeakShape * >(argp1); - result = (GaussFisherPeakShape *)((GaussFisherPeakShape const *)arg1)->clone(); + { + try { + result = (GaussFisherPeakShape *)((GaussFisherPeakShape const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussFisherPeakShape, 0 | 0 ); return resultobj; fail: @@ -39279,7 +43669,17 @@ SWIGINTERN PyObject *_wrap_GaussFisherPeakShape_className(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussFisherPeakShape_className" "', argument " "1"" of type '" "GaussFisherPeakShape const *""'"); } arg1 = reinterpret_cast< GaussFisherPeakShape * >(argp1); - result = ((GaussFisherPeakShape const *)arg1)->className(); + { + try { + result = ((GaussFisherPeakShape const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -39302,7 +43702,17 @@ SWIGINTERN PyObject *_wrap_GaussFisherPeakShape_parDefs(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussFisherPeakShape_parDefs" "', argument " "1"" of type '" "GaussFisherPeakShape const *""'"); } arg1 = reinterpret_cast< GaussFisherPeakShape * >(argp1); - result = ((GaussFisherPeakShape const *)arg1)->parDefs(); + { + try { + result = ((GaussFisherPeakShape const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -39356,7 +43766,17 @@ SWIGINTERN PyObject *_wrap_GaussFisherPeakShape_peakDistribution(PyObject *self, if (SWIG_IsNewObj(res3)) delete temp; } } - result = (double)((GaussFisherPeakShape const *)arg1)->peakDistribution(arg2,arg3); + { + try { + result = (double)((GaussFisherPeakShape const *)arg1)->peakDistribution(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -39379,7 +43799,17 @@ SWIGINTERN PyObject *_wrap_GaussFisherPeakShape_angularDisorder(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussFisherPeakShape_angularDisorder" "', argument " "1"" of type '" "GaussFisherPeakShape const *""'"); } arg1 = reinterpret_cast< GaussFisherPeakShape * >(argp1); - result = (bool)((GaussFisherPeakShape const *)arg1)->angularDisorder(); + { + try { + result = (bool)((GaussFisherPeakShape const *)arg1)->angularDisorder(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -39428,7 +43858,17 @@ SWIGINTERN PyObject *_wrap_new_LorentzFisherPeakShape(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LorentzFisherPeakShape" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (LorentzFisherPeakShape *)new LorentzFisherPeakShape(arg1,arg2,arg3); + { + try { + result = (LorentzFisherPeakShape *)new LorentzFisherPeakShape(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LorentzFisherPeakShape, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -39450,7 +43890,17 @@ SWIGINTERN PyObject *_wrap_delete_LorentzFisherPeakShape(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LorentzFisherPeakShape" "', argument " "1"" of type '" "LorentzFisherPeakShape *""'"); } arg1 = reinterpret_cast< LorentzFisherPeakShape * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -39473,7 +43923,17 @@ SWIGINTERN PyObject *_wrap_LorentzFisherPeakShape_clone(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LorentzFisherPeakShape_clone" "', argument " "1"" of type '" "LorentzFisherPeakShape const *""'"); } arg1 = reinterpret_cast< LorentzFisherPeakShape * >(argp1); - result = (LorentzFisherPeakShape *)((LorentzFisherPeakShape const *)arg1)->clone(); + { + try { + result = (LorentzFisherPeakShape *)((LorentzFisherPeakShape const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LorentzFisherPeakShape, 0 | 0 ); return resultobj; fail: @@ -39496,7 +43956,17 @@ SWIGINTERN PyObject *_wrap_LorentzFisherPeakShape_className(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LorentzFisherPeakShape_className" "', argument " "1"" of type '" "LorentzFisherPeakShape const *""'"); } arg1 = reinterpret_cast< LorentzFisherPeakShape * >(argp1); - result = ((LorentzFisherPeakShape const *)arg1)->className(); + { + try { + result = ((LorentzFisherPeakShape const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -39519,7 +43989,17 @@ SWIGINTERN PyObject *_wrap_LorentzFisherPeakShape_parDefs(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LorentzFisherPeakShape_parDefs" "', argument " "1"" of type '" "LorentzFisherPeakShape const *""'"); } arg1 = reinterpret_cast< LorentzFisherPeakShape * >(argp1); - result = ((LorentzFisherPeakShape const *)arg1)->parDefs(); + { + try { + result = ((LorentzFisherPeakShape const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -39573,7 +44053,17 @@ SWIGINTERN PyObject *_wrap_LorentzFisherPeakShape_peakDistribution(PyObject *sel if (SWIG_IsNewObj(res3)) delete temp; } } - result = (double)((LorentzFisherPeakShape const *)arg1)->peakDistribution(arg2,arg3); + { + try { + result = (double)((LorentzFisherPeakShape const *)arg1)->peakDistribution(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -39596,7 +44086,17 @@ SWIGINTERN PyObject *_wrap_LorentzFisherPeakShape_angularDisorder(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LorentzFisherPeakShape_angularDisorder" "', argument " "1"" of type '" "LorentzFisherPeakShape const *""'"); } arg1 = reinterpret_cast< LorentzFisherPeakShape * >(argp1); - result = (bool)((LorentzFisherPeakShape const *)arg1)->angularDisorder(); + { + try { + result = (bool)((LorentzFisherPeakShape const *)arg1)->angularDisorder(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -39669,7 +44169,17 @@ SWIGINTERN PyObject *_wrap_new_MisesFisherGaussPeakShape(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MisesFisherGaussPeakShape" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - result = (MisesFisherGaussPeakShape *)new MisesFisherGaussPeakShape(arg1,arg2,arg3,arg4,arg5); + { + try { + result = (MisesFisherGaussPeakShape *)new MisesFisherGaussPeakShape(arg1,arg2,arg3,arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MisesFisherGaussPeakShape, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -39691,7 +44201,17 @@ SWIGINTERN PyObject *_wrap_delete_MisesFisherGaussPeakShape(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MisesFisherGaussPeakShape" "', argument " "1"" of type '" "MisesFisherGaussPeakShape *""'"); } arg1 = reinterpret_cast< MisesFisherGaussPeakShape * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -39714,7 +44234,17 @@ SWIGINTERN PyObject *_wrap_MisesFisherGaussPeakShape_clone(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MisesFisherGaussPeakShape_clone" "', argument " "1"" of type '" "MisesFisherGaussPeakShape const *""'"); } arg1 = reinterpret_cast< MisesFisherGaussPeakShape * >(argp1); - result = (MisesFisherGaussPeakShape *)((MisesFisherGaussPeakShape const *)arg1)->clone(); + { + try { + result = (MisesFisherGaussPeakShape *)((MisesFisherGaussPeakShape const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MisesFisherGaussPeakShape, 0 | 0 ); return resultobj; fail: @@ -39737,7 +44267,17 @@ SWIGINTERN PyObject *_wrap_MisesFisherGaussPeakShape_className(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MisesFisherGaussPeakShape_className" "', argument " "1"" of type '" "MisesFisherGaussPeakShape const *""'"); } arg1 = reinterpret_cast< MisesFisherGaussPeakShape * >(argp1); - result = ((MisesFisherGaussPeakShape const *)arg1)->className(); + { + try { + result = ((MisesFisherGaussPeakShape const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -39760,7 +44300,17 @@ SWIGINTERN PyObject *_wrap_MisesFisherGaussPeakShape_parDefs(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MisesFisherGaussPeakShape_parDefs" "', argument " "1"" of type '" "MisesFisherGaussPeakShape const *""'"); } arg1 = reinterpret_cast< MisesFisherGaussPeakShape * >(argp1); - result = ((MisesFisherGaussPeakShape const *)arg1)->parDefs(); + { + try { + result = ((MisesFisherGaussPeakShape const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -39814,7 +44364,17 @@ SWIGINTERN PyObject *_wrap_MisesFisherGaussPeakShape_peakDistribution(PyObject * if (SWIG_IsNewObj(res3)) delete temp; } } - result = (double)((MisesFisherGaussPeakShape const *)arg1)->peakDistribution(arg2,arg3); + { + try { + result = (double)((MisesFisherGaussPeakShape const *)arg1)->peakDistribution(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -39837,7 +44397,17 @@ SWIGINTERN PyObject *_wrap_MisesFisherGaussPeakShape_angularDisorder(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MisesFisherGaussPeakShape_angularDisorder" "', argument " "1"" of type '" "MisesFisherGaussPeakShape const *""'"); } arg1 = reinterpret_cast< MisesFisherGaussPeakShape * >(argp1); - result = (bool)((MisesFisherGaussPeakShape const *)arg1)->angularDisorder(); + { + try { + result = (bool)((MisesFisherGaussPeakShape const *)arg1)->angularDisorder(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -39902,7 +44472,17 @@ SWIGINTERN PyObject *_wrap_new_MisesGaussPeakShape(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MisesGaussPeakShape" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (MisesGaussPeakShape *)new MisesGaussPeakShape(arg1,arg2,arg3,arg4); + { + try { + result = (MisesGaussPeakShape *)new MisesGaussPeakShape(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MisesGaussPeakShape, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -39924,7 +44504,17 @@ SWIGINTERN PyObject *_wrap_delete_MisesGaussPeakShape(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MisesGaussPeakShape" "', argument " "1"" of type '" "MisesGaussPeakShape *""'"); } arg1 = reinterpret_cast< MisesGaussPeakShape * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -39947,7 +44537,17 @@ SWIGINTERN PyObject *_wrap_MisesGaussPeakShape_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MisesGaussPeakShape_clone" "', argument " "1"" of type '" "MisesGaussPeakShape const *""'"); } arg1 = reinterpret_cast< MisesGaussPeakShape * >(argp1); - result = (MisesGaussPeakShape *)((MisesGaussPeakShape const *)arg1)->clone(); + { + try { + result = (MisesGaussPeakShape *)((MisesGaussPeakShape const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MisesGaussPeakShape, 0 | 0 ); return resultobj; fail: @@ -39970,7 +44570,17 @@ SWIGINTERN PyObject *_wrap_MisesGaussPeakShape_className(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MisesGaussPeakShape_className" "', argument " "1"" of type '" "MisesGaussPeakShape const *""'"); } arg1 = reinterpret_cast< MisesGaussPeakShape * >(argp1); - result = ((MisesGaussPeakShape const *)arg1)->className(); + { + try { + result = ((MisesGaussPeakShape const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -39993,7 +44603,17 @@ SWIGINTERN PyObject *_wrap_MisesGaussPeakShape_parDefs(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MisesGaussPeakShape_parDefs" "', argument " "1"" of type '" "MisesGaussPeakShape const *""'"); } arg1 = reinterpret_cast< MisesGaussPeakShape * >(argp1); - result = ((MisesGaussPeakShape const *)arg1)->parDefs(); + { + try { + result = ((MisesGaussPeakShape const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -40047,7 +44667,17 @@ SWIGINTERN PyObject *_wrap_MisesGaussPeakShape_peakDistribution(PyObject *self, if (SWIG_IsNewObj(res3)) delete temp; } } - result = (double)((MisesGaussPeakShape const *)arg1)->peakDistribution(arg2,arg3); + { + try { + result = (double)((MisesGaussPeakShape const *)arg1)->peakDistribution(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -40070,7 +44700,17 @@ SWIGINTERN PyObject *_wrap_MisesGaussPeakShape_angularDisorder(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MisesGaussPeakShape_angularDisorder" "', argument " "1"" of type '" "MisesGaussPeakShape const *""'"); } arg1 = reinterpret_cast< MisesGaussPeakShape * >(argp1); - result = (bool)((MisesGaussPeakShape const *)arg1)->angularDisorder(); + { + try { + result = (bool)((MisesGaussPeakShape const *)arg1)->angularDisorder(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -40104,7 +44744,17 @@ SWIGINTERN PyObject *_wrap_IInterference_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IInterference_clone" "', argument " "1"" of type '" "IInterference const *""'"); } arg1 = reinterpret_cast< IInterference * >(argp1); - result = (IInterference *)((IInterference const *)arg1)->clone(); + { + try { + result = (IInterference *)((IInterference const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IInterference, 0 | 0 ); return resultobj; fail: @@ -40149,7 +44799,17 @@ SWIGINTERN PyObject *_wrap_IInterference_structureFactor__SWIG_0(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IInterference_structureFactor" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((IInterference const *)arg1)->structureFactor(arg2,arg3); + { + try { + result = (double)((IInterference const *)arg1)->structureFactor(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -40186,7 +44846,17 @@ SWIGINTERN PyObject *_wrap_IInterference_structureFactor__SWIG_1(PyObject *self, if (SWIG_IsNewObj(res2)) delete temp; } } - result = (double)((IInterference const *)arg1)->structureFactor(arg2); + { + try { + result = (double)((IInterference const *)arg1)->structureFactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -40265,7 +44935,17 @@ SWIGINTERN PyObject *_wrap_IInterference_setPositionVariance(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IInterference_setPositionVariance" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setPositionVariance(arg2); + { + try { + (arg1)->setPositionVariance(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -40288,7 +44968,17 @@ SWIGINTERN PyObject *_wrap_IInterference_positionVariance(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IInterference_positionVariance" "', argument " "1"" of type '" "IInterference const *""'"); } arg1 = reinterpret_cast< IInterference * >(argp1); - result = (double)((IInterference const *)arg1)->positionVariance(); + { + try { + result = (double)((IInterference const *)arg1)->positionVariance(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -40311,7 +45001,17 @@ SWIGINTERN PyObject *_wrap_IInterference_particleDensity(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IInterference_particleDensity" "', argument " "1"" of type '" "IInterference const *""'"); } arg1 = reinterpret_cast< IInterference * >(argp1); - result = (double)((IInterference const *)arg1)->particleDensity(); + { + try { + result = (double)((IInterference const *)arg1)->particleDensity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -40334,7 +45034,17 @@ SWIGINTERN PyObject *_wrap_IInterference_supportsMultilayer(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IInterference_supportsMultilayer" "', argument " "1"" of type '" "IInterference const *""'"); } arg1 = reinterpret_cast< IInterference * >(argp1); - result = (bool)((IInterference const *)arg1)->supportsMultilayer(); + { + try { + result = (bool)((IInterference const *)arg1)->supportsMultilayer(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -40372,7 +45082,17 @@ SWIGINTERN PyObject *_wrap_IInterference_DWfactor(PyObject *self, PyObject *args if (SWIG_IsNewObj(res2)) delete temp; } } - result = (double)((IInterference const *)arg1)->DWfactor(arg2); + { + try { + result = (double)((IInterference const *)arg1)->DWfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -40394,7 +45114,17 @@ SWIGINTERN PyObject *_wrap_delete_IInterference(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IInterference" "', argument " "1"" of type '" "IInterference *""'"); } arg1 = reinterpret_cast< IInterference * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -40431,7 +45161,17 @@ SWIGINTERN PyObject *_wrap_new_Interference1DLattice(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Interference1DLattice" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Interference1DLattice *)new Interference1DLattice(arg1,arg2); + { + try { + result = (Interference1DLattice *)new Interference1DLattice(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interference1DLattice, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -40453,7 +45193,17 @@ SWIGINTERN PyObject *_wrap_delete_Interference1DLattice(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interference1DLattice" "', argument " "1"" of type '" "Interference1DLattice *""'"); } arg1 = reinterpret_cast< Interference1DLattice * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -40476,7 +45226,17 @@ SWIGINTERN PyObject *_wrap_Interference1DLattice_clone(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference1DLattice_clone" "', argument " "1"" of type '" "Interference1DLattice const *""'"); } arg1 = reinterpret_cast< Interference1DLattice * >(argp1); - result = (Interference1DLattice *)((Interference1DLattice const *)arg1)->clone(); + { + try { + result = (Interference1DLattice *)((Interference1DLattice const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interference1DLattice, 0 | 0 ); return resultobj; fail: @@ -40499,7 +45259,17 @@ SWIGINTERN PyObject *_wrap_Interference1DLattice_className(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference1DLattice_className" "', argument " "1"" of type '" "Interference1DLattice const *""'"); } arg1 = reinterpret_cast< Interference1DLattice * >(argp1); - result = ((Interference1DLattice const *)arg1)->className(); + { + try { + result = ((Interference1DLattice const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -40522,7 +45292,17 @@ SWIGINTERN PyObject *_wrap_Interference1DLattice_parDefs(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference1DLattice_parDefs" "', argument " "1"" of type '" "Interference1DLattice const *""'"); } arg1 = reinterpret_cast< Interference1DLattice * >(argp1); - result = ((Interference1DLattice const *)arg1)->parDefs(); + { + try { + result = ((Interference1DLattice const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -40554,7 +45334,17 @@ SWIGINTERN PyObject *_wrap_Interference1DLattice_setDecayFunction(PyObject *self SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interference1DLattice_setDecayFunction" "', argument " "2"" of type '" "IProfile1D const &""'"); } arg2 = reinterpret_cast< IProfile1D * >(argp2); - (arg1)->setDecayFunction((IProfile1D const &)*arg2); + { + try { + (arg1)->setDecayFunction((IProfile1D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -40577,7 +45367,17 @@ SWIGINTERN PyObject *_wrap_Interference1DLattice_length(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference1DLattice_length" "', argument " "1"" of type '" "Interference1DLattice const *""'"); } arg1 = reinterpret_cast< Interference1DLattice * >(argp1); - result = (double)((Interference1DLattice const *)arg1)->length(); + { + try { + result = (double)((Interference1DLattice const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -40600,7 +45400,17 @@ SWIGINTERN PyObject *_wrap_Interference1DLattice_xi(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference1DLattice_xi" "', argument " "1"" of type '" "Interference1DLattice const *""'"); } arg1 = reinterpret_cast< Interference1DLattice * >(argp1); - result = (double)((Interference1DLattice const *)arg1)->xi(); + { + try { + result = (double)((Interference1DLattice const *)arg1)->xi(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -40623,7 +45433,17 @@ SWIGINTERN PyObject *_wrap_Interference1DLattice_nodeChildren(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference1DLattice_nodeChildren" "', argument " "1"" of type '" "Interference1DLattice const *""'"); } arg1 = reinterpret_cast< Interference1DLattice * >(argp1); - result = ((Interference1DLattice const *)arg1)->nodeChildren(); + { + try { + result = ((Interference1DLattice const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -40646,7 +45466,17 @@ SWIGINTERN PyObject *_wrap_Interference1DLattice_validate(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference1DLattice_validate" "', argument " "1"" of type '" "Interference1DLattice const *""'"); } arg1 = reinterpret_cast< Interference1DLattice * >(argp1); - result = ((Interference1DLattice const *)arg1)->validate(); + { + try { + result = ((Interference1DLattice const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -40683,7 +45513,17 @@ SWIGINTERN PyObject *_wrap_new_Interference2DLattice(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Interference2DLattice" "', argument " "1"" of type '" "Lattice2D const &""'"); } arg1 = reinterpret_cast< Lattice2D * >(argp1); - result = (Interference2DLattice *)new Interference2DLattice((Lattice2D const &)*arg1); + { + try { + result = (Interference2DLattice *)new Interference2DLattice((Lattice2D const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interference2DLattice, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -40705,7 +45545,17 @@ SWIGINTERN PyObject *_wrap_delete_Interference2DLattice(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interference2DLattice" "', argument " "1"" of type '" "Interference2DLattice *""'"); } arg1 = reinterpret_cast< Interference2DLattice * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -40728,7 +45578,17 @@ SWIGINTERN PyObject *_wrap_Interference2DLattice_clone(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DLattice_clone" "', argument " "1"" of type '" "Interference2DLattice const *""'"); } arg1 = reinterpret_cast< Interference2DLattice * >(argp1); - result = (Interference2DLattice *)((Interference2DLattice const *)arg1)->clone(); + { + try { + result = (Interference2DLattice *)((Interference2DLattice const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interference2DLattice, 0 | 0 ); return resultobj; fail: @@ -40751,7 +45611,17 @@ SWIGINTERN PyObject *_wrap_Interference2DLattice_className(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DLattice_className" "', argument " "1"" of type '" "Interference2DLattice const *""'"); } arg1 = reinterpret_cast< Interference2DLattice * >(argp1); - result = ((Interference2DLattice const *)arg1)->className(); + { + try { + result = ((Interference2DLattice const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -40783,7 +45653,17 @@ SWIGINTERN PyObject *_wrap_Interference2DLattice_setDecayFunction(PyObject *self SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interference2DLattice_setDecayFunction" "', argument " "2"" of type '" "IProfile2D const &""'"); } arg2 = reinterpret_cast< IProfile2D * >(argp2); - (arg1)->setDecayFunction((IProfile2D const &)*arg2); + { + try { + (arg1)->setDecayFunction((IProfile2D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -40812,7 +45692,17 @@ SWIGINTERN PyObject *_wrap_Interference2DLattice_setIntegrationOverXi(PyObject * SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Interference2DLattice_setIntegrationOverXi" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setIntegrationOverXi(arg2); + { + try { + (arg1)->setIntegrationOverXi(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -40835,7 +45725,17 @@ SWIGINTERN PyObject *_wrap_Interference2DLattice_integrationOverXi(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DLattice_integrationOverXi" "', argument " "1"" of type '" "Interference2DLattice const *""'"); } arg1 = reinterpret_cast< Interference2DLattice * >(argp1); - result = (bool)((Interference2DLattice const *)arg1)->integrationOverXi(); + { + try { + result = (bool)((Interference2DLattice const *)arg1)->integrationOverXi(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -40858,7 +45758,17 @@ SWIGINTERN PyObject *_wrap_Interference2DLattice_lattice(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DLattice_lattice" "', argument " "1"" of type '" "Interference2DLattice const *""'"); } arg1 = reinterpret_cast< Interference2DLattice * >(argp1); - result = (Lattice2D *) &((Interference2DLattice const *)arg1)->lattice(); + { + try { + result = (Lattice2D *) &((Interference2DLattice const *)arg1)->lattice(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice2D, 0 | 0 ); return resultobj; fail: @@ -40881,7 +45791,17 @@ SWIGINTERN PyObject *_wrap_Interference2DLattice_particleDensity(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DLattice_particleDensity" "', argument " "1"" of type '" "Interference2DLattice const *""'"); } arg1 = reinterpret_cast< Interference2DLattice * >(argp1); - result = (double)((Interference2DLattice const *)arg1)->particleDensity(); + { + try { + result = (double)((Interference2DLattice const *)arg1)->particleDensity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -40904,7 +45824,17 @@ SWIGINTERN PyObject *_wrap_Interference2DLattice_nodeChildren(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DLattice_nodeChildren" "', argument " "1"" of type '" "Interference2DLattice const *""'"); } arg1 = reinterpret_cast< Interference2DLattice * >(argp1); - result = ((Interference2DLattice const *)arg1)->nodeChildren(); + { + try { + result = ((Interference2DLattice const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -40964,7 +45894,17 @@ SWIGINTERN PyObject *_wrap_new_Interference2DParacrystal(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Interference2DParacrystal" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (Interference2DParacrystal *)new Interference2DParacrystal((Lattice2D const &)*arg1,arg2,arg3,arg4); + { + try { + result = (Interference2DParacrystal *)new Interference2DParacrystal((Lattice2D const &)*arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interference2DParacrystal, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -40986,7 +45926,17 @@ SWIGINTERN PyObject *_wrap_delete_Interference2DParacrystal(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interference2DParacrystal" "', argument " "1"" of type '" "Interference2DParacrystal *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -41009,7 +45959,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_clone(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_clone" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = (Interference2DParacrystal *)((Interference2DParacrystal const *)arg1)->clone(); + { + try { + result = (Interference2DParacrystal *)((Interference2DParacrystal const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interference2DParacrystal, 0 | 0 ); return resultobj; fail: @@ -41032,7 +45992,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_className(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_className" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = ((Interference2DParacrystal const *)arg1)->className(); + { + try { + result = ((Interference2DParacrystal const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -41055,7 +46025,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_parDefs(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_parDefs" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = ((Interference2DParacrystal const *)arg1)->parDefs(); + { + try { + result = ((Interference2DParacrystal const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -41092,7 +46072,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_setDomainSizes(PyObject *se SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Interference2DParacrystal_setDomainSizes" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->setDomainSizes(arg2,arg3); + { + try { + (arg1)->setDomainSizes(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -41135,7 +46125,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_setProbabilityDistributions SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interference2DParacrystal_setProbabilityDistributions" "', argument " "3"" of type '" "IProfile2D const &""'"); } arg3 = reinterpret_cast< IProfile2D * >(argp3); - (arg1)->setProbabilityDistributions((IProfile2D const &)*arg2,(IProfile2D const &)*arg3); + { + try { + (arg1)->setProbabilityDistributions((IProfile2D const &)*arg2,(IProfile2D const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -41164,7 +46164,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_setDampingLength(PyObject * SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Interference2DParacrystal_setDampingLength" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setDampingLength(arg2); + { + try { + (arg1)->setDampingLength(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -41187,7 +46197,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_domainSizes(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_domainSizes" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = ((Interference2DParacrystal const *)arg1)->domainSizes(); + { + try { + result = ((Interference2DParacrystal const *)arg1)->domainSizes(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -41216,7 +46236,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_setIntegrationOverXi(PyObje SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Interference2DParacrystal_setIntegrationOverXi" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setIntegrationOverXi(arg2); + { + try { + (arg1)->setIntegrationOverXi(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -41239,7 +46269,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_integrationOverXi(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_integrationOverXi" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = (bool)((Interference2DParacrystal const *)arg1)->integrationOverXi(); + { + try { + result = (bool)((Interference2DParacrystal const *)arg1)->integrationOverXi(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -41262,7 +46302,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_dampingLength(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_dampingLength" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = (double)((Interference2DParacrystal const *)arg1)->dampingLength(); + { + try { + result = (double)((Interference2DParacrystal const *)arg1)->dampingLength(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -41285,7 +46335,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_lattice(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_lattice" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = (Lattice2D *) &((Interference2DParacrystal const *)arg1)->lattice(); + { + try { + result = (Lattice2D *) &((Interference2DParacrystal const *)arg1)->lattice(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice2D, 0 | 0 ); return resultobj; fail: @@ -41308,7 +46368,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_particleDensity(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_particleDensity" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = (double)((Interference2DParacrystal const *)arg1)->particleDensity(); + { + try { + result = (double)((Interference2DParacrystal const *)arg1)->particleDensity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -41331,7 +46401,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_nodeChildren(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_nodeChildren" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = ((Interference2DParacrystal const *)arg1)->nodeChildren(); + { + try { + result = ((Interference2DParacrystal const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -41354,7 +46434,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_pdf1(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_pdf1" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = (IProfile2D *)((Interference2DParacrystal const *)arg1)->pdf1(); + { + try { + result = (IProfile2D *)((Interference2DParacrystal const *)arg1)->pdf1(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IProfile2D, 0 | 0 ); return resultobj; fail: @@ -41377,7 +46467,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_pdf2(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_pdf2" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = (IProfile2D *)((Interference2DParacrystal const *)arg1)->pdf2(); + { + try { + result = (IProfile2D *)((Interference2DParacrystal const *)arg1)->pdf2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IProfile2D, 0 | 0 ); return resultobj; fail: @@ -41400,7 +46500,17 @@ SWIGINTERN PyObject *_wrap_Interference2DParacrystal_validate(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DParacrystal_validate" "', argument " "1"" of type '" "Interference2DParacrystal const *""'"); } arg1 = reinterpret_cast< Interference2DParacrystal * >(argp1); - result = ((Interference2DParacrystal const *)arg1)->validate(); + { + try { + result = ((Interference2DParacrystal const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -41451,7 +46561,17 @@ SWIGINTERN PyObject *_wrap_new_Interference2DSuperLattice__SWIG_0(PyObject *self SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Interference2DSuperLattice" "', argument " "3"" of type '" "unsigned int""'"); } arg3 = static_cast< unsigned int >(val3); - result = (Interference2DSuperLattice *)new Interference2DSuperLattice((Lattice2D const &)*arg1,arg2,arg3); + { + try { + result = (Interference2DSuperLattice *)new Interference2DSuperLattice((Lattice2D const &)*arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interference2DSuperLattice, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -41512,7 +46632,17 @@ SWIGINTERN PyObject *_wrap_new_Interference2DSuperLattice__SWIG_1(PyObject *self SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Interference2DSuperLattice" "', argument " "6"" of type '" "unsigned int""'"); } arg6 = static_cast< unsigned int >(val6); - result = (Interference2DSuperLattice *)new Interference2DSuperLattice(arg1,arg2,arg3,arg4,arg5,arg6); + { + try { + result = (Interference2DSuperLattice *)new Interference2DSuperLattice(arg1,arg2,arg3,arg4,arg5,arg6); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interference2DSuperLattice, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -41612,7 +46742,17 @@ SWIGINTERN PyObject *_wrap_delete_Interference2DSuperLattice(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interference2DSuperLattice" "', argument " "1"" of type '" "Interference2DSuperLattice *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -41635,7 +46775,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_clone(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DSuperLattice_clone" "', argument " "1"" of type '" "Interference2DSuperLattice const *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - result = (Interference2DSuperLattice *)((Interference2DSuperLattice const *)arg1)->clone(); + { + try { + result = (Interference2DSuperLattice *)((Interference2DSuperLattice const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interference2DSuperLattice, 0 | 0 ); return resultobj; fail: @@ -41658,7 +46808,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_className(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DSuperLattice_className" "', argument " "1"" of type '" "Interference2DSuperLattice const *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - result = ((Interference2DSuperLattice const *)arg1)->className(); + { + try { + result = ((Interference2DSuperLattice const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -41681,7 +46841,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_parDefs(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DSuperLattice_parDefs" "', argument " "1"" of type '" "Interference2DSuperLattice const *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - result = ((Interference2DSuperLattice const *)arg1)->parDefs(); + { + try { + result = ((Interference2DSuperLattice const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -41713,7 +46883,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_setSubstructureIFF(PyObjec SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interference2DSuperLattice_setSubstructureIFF" "', argument " "2"" of type '" "IInterference const &""'"); } arg2 = reinterpret_cast< IInterference * >(argp2); - (arg1)->setSubstructureIFF((IInterference const &)*arg2); + { + try { + (arg1)->setSubstructureIFF((IInterference const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -41736,7 +46916,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_substructureIFF(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DSuperLattice_substructureIFF" "', argument " "1"" of type '" "Interference2DSuperLattice const *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - result = (IInterference *) &((Interference2DSuperLattice const *)arg1)->substructureIFF(); + { + try { + result = (IInterference *) &((Interference2DSuperLattice const *)arg1)->substructureIFF(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IInterference, 0 | 0 ); return resultobj; fail: @@ -41781,7 +46971,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_structureFactor__SWIG_0(Py SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Interference2DSuperLattice_structureFactor" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((Interference2DSuperLattice const *)arg1)->structureFactor(arg2,arg3); + { + try { + result = (double)((Interference2DSuperLattice const *)arg1)->structureFactor(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -41818,7 +47018,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_structureFactor__SWIG_1(Py if (SWIG_IsNewObj(res2)) delete temp; } } - result = (double)((Interference2DSuperLattice const *)arg1)->structureFactor(arg2); + { + try { + result = (double)((Interference2DSuperLattice const *)arg1)->structureFactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -41891,7 +47101,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_domainSize1(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DSuperLattice_domainSize1" "', argument " "1"" of type '" "Interference2DSuperLattice const *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - result = (unsigned int)((Interference2DSuperLattice const *)arg1)->domainSize1(); + { + try { + result = (unsigned int)((Interference2DSuperLattice const *)arg1)->domainSize1(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: @@ -41914,7 +47134,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_domainSize2(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DSuperLattice_domainSize2" "', argument " "1"" of type '" "Interference2DSuperLattice const *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - result = (unsigned int)((Interference2DSuperLattice const *)arg1)->domainSize2(); + { + try { + result = (unsigned int)((Interference2DSuperLattice const *)arg1)->domainSize2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: @@ -41943,7 +47173,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_setIntegrationOverXi(PyObj SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Interference2DSuperLattice_setIntegrationOverXi" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setIntegrationOverXi(arg2); + { + try { + (arg1)->setIntegrationOverXi(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -41966,7 +47206,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_integrationOverXi(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DSuperLattice_integrationOverXi" "', argument " "1"" of type '" "Interference2DSuperLattice const *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - result = (bool)((Interference2DSuperLattice const *)arg1)->integrationOverXi(); + { + try { + result = (bool)((Interference2DSuperLattice const *)arg1)->integrationOverXi(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -41989,7 +47239,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_lattice(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DSuperLattice_lattice" "', argument " "1"" of type '" "Interference2DSuperLattice const *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - result = (Lattice2D *) &((Interference2DSuperLattice const *)arg1)->lattice(); + { + try { + result = (Lattice2D *) &((Interference2DSuperLattice const *)arg1)->lattice(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice2D, 0 | 0 ); return resultobj; fail: @@ -42012,7 +47272,17 @@ SWIGINTERN PyObject *_wrap_Interference2DSuperLattice_nodeChildren(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interference2DSuperLattice_nodeChildren" "', argument " "1"" of type '" "Interference2DSuperLattice const *""'"); } arg1 = reinterpret_cast< Interference2DSuperLattice * >(argp1); - result = ((Interference2DSuperLattice const *)arg1)->nodeChildren(); + { + try { + result = ((Interference2DSuperLattice const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -42064,7 +47334,17 @@ SWIGINTERN PyObject *_wrap_new_InterferenceFinite2DLattice(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_InterferenceFinite2DLattice" "', argument " "3"" of type '" "unsigned int""'"); } arg3 = static_cast< unsigned int >(val3); - result = (InterferenceFinite2DLattice *)new InterferenceFinite2DLattice((Lattice2D const &)*arg1,arg2,arg3); + { + try { + result = (InterferenceFinite2DLattice *)new InterferenceFinite2DLattice((Lattice2D const &)*arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceFinite2DLattice, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -42086,7 +47366,17 @@ SWIGINTERN PyObject *_wrap_delete_InterferenceFinite2DLattice(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InterferenceFinite2DLattice" "', argument " "1"" of type '" "InterferenceFinite2DLattice *""'"); } arg1 = reinterpret_cast< InterferenceFinite2DLattice * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -42109,7 +47399,17 @@ SWIGINTERN PyObject *_wrap_InterferenceFinite2DLattice_clone(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFinite2DLattice_clone" "', argument " "1"" of type '" "InterferenceFinite2DLattice const *""'"); } arg1 = reinterpret_cast< InterferenceFinite2DLattice * >(argp1); - result = (InterferenceFinite2DLattice *)((InterferenceFinite2DLattice const *)arg1)->clone(); + { + try { + result = (InterferenceFinite2DLattice *)((InterferenceFinite2DLattice const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceFinite2DLattice, 0 | 0 ); return resultobj; fail: @@ -42132,7 +47432,17 @@ SWIGINTERN PyObject *_wrap_InterferenceFinite2DLattice_className(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFinite2DLattice_className" "', argument " "1"" of type '" "InterferenceFinite2DLattice const *""'"); } arg1 = reinterpret_cast< InterferenceFinite2DLattice * >(argp1); - result = ((InterferenceFinite2DLattice const *)arg1)->className(); + { + try { + result = ((InterferenceFinite2DLattice const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -42155,7 +47465,17 @@ SWIGINTERN PyObject *_wrap_InterferenceFinite2DLattice_numberUnitCells1(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFinite2DLattice_numberUnitCells1" "', argument " "1"" of type '" "InterferenceFinite2DLattice const *""'"); } arg1 = reinterpret_cast< InterferenceFinite2DLattice * >(argp1); - result = (unsigned int)((InterferenceFinite2DLattice const *)arg1)->numberUnitCells1(); + { + try { + result = (unsigned int)((InterferenceFinite2DLattice const *)arg1)->numberUnitCells1(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: @@ -42178,7 +47498,17 @@ SWIGINTERN PyObject *_wrap_InterferenceFinite2DLattice_numberUnitCells2(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFinite2DLattice_numberUnitCells2" "', argument " "1"" of type '" "InterferenceFinite2DLattice const *""'"); } arg1 = reinterpret_cast< InterferenceFinite2DLattice * >(argp1); - result = (unsigned int)((InterferenceFinite2DLattice const *)arg1)->numberUnitCells2(); + { + try { + result = (unsigned int)((InterferenceFinite2DLattice const *)arg1)->numberUnitCells2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: @@ -42207,7 +47537,17 @@ SWIGINTERN PyObject *_wrap_InterferenceFinite2DLattice_setIntegrationOverXi(PyOb SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InterferenceFinite2DLattice_setIntegrationOverXi" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setIntegrationOverXi(arg2); + { + try { + (arg1)->setIntegrationOverXi(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -42230,7 +47570,17 @@ SWIGINTERN PyObject *_wrap_InterferenceFinite2DLattice_integrationOverXi(PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFinite2DLattice_integrationOverXi" "', argument " "1"" of type '" "InterferenceFinite2DLattice const *""'"); } arg1 = reinterpret_cast< InterferenceFinite2DLattice * >(argp1); - result = (bool)((InterferenceFinite2DLattice const *)arg1)->integrationOverXi(); + { + try { + result = (bool)((InterferenceFinite2DLattice const *)arg1)->integrationOverXi(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -42253,7 +47603,17 @@ SWIGINTERN PyObject *_wrap_InterferenceFinite2DLattice_lattice(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFinite2DLattice_lattice" "', argument " "1"" of type '" "InterferenceFinite2DLattice const *""'"); } arg1 = reinterpret_cast< InterferenceFinite2DLattice * >(argp1); - result = (Lattice2D *) &((InterferenceFinite2DLattice const *)arg1)->lattice(); + { + try { + result = (Lattice2D *) &((InterferenceFinite2DLattice const *)arg1)->lattice(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice2D, 0 | 0 ); return resultobj; fail: @@ -42276,7 +47636,17 @@ SWIGINTERN PyObject *_wrap_InterferenceFinite2DLattice_particleDensity(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFinite2DLattice_particleDensity" "', argument " "1"" of type '" "InterferenceFinite2DLattice const *""'"); } arg1 = reinterpret_cast< InterferenceFinite2DLattice * >(argp1); - result = (double)((InterferenceFinite2DLattice const *)arg1)->particleDensity(); + { + try { + result = (double)((InterferenceFinite2DLattice const *)arg1)->particleDensity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -42299,7 +47669,17 @@ SWIGINTERN PyObject *_wrap_InterferenceFinite2DLattice_nodeChildren(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceFinite2DLattice_nodeChildren" "', argument " "1"" of type '" "InterferenceFinite2DLattice const *""'"); } arg1 = reinterpret_cast< InterferenceFinite2DLattice * >(argp1); - result = ((InterferenceFinite2DLattice const *)arg1)->nodeChildren(); + { + try { + result = ((InterferenceFinite2DLattice const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -42347,7 +47727,17 @@ SWIGINTERN PyObject *_wrap_new_InterferenceHardDisk__SWIG_0(PyObject *self, Py_s SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_InterferenceHardDisk" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (InterferenceHardDisk *)new InterferenceHardDisk(arg1,arg2,arg3); + { + try { + result = (InterferenceHardDisk *)new InterferenceHardDisk(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceHardDisk, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -42376,7 +47766,17 @@ SWIGINTERN PyObject *_wrap_new_InterferenceHardDisk__SWIG_1(PyObject *self, Py_s SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InterferenceHardDisk" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (InterferenceHardDisk *)new InterferenceHardDisk(arg1,arg2); + { + try { + result = (InterferenceHardDisk *)new InterferenceHardDisk(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceHardDisk, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -42454,7 +47854,17 @@ SWIGINTERN PyObject *_wrap_delete_InterferenceHardDisk(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InterferenceHardDisk" "', argument " "1"" of type '" "InterferenceHardDisk *""'"); } arg1 = reinterpret_cast< InterferenceHardDisk * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -42477,7 +47887,17 @@ SWIGINTERN PyObject *_wrap_InterferenceHardDisk_parDefs(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceHardDisk_parDefs" "', argument " "1"" of type '" "InterferenceHardDisk const *""'"); } arg1 = reinterpret_cast< InterferenceHardDisk * >(argp1); - result = ((InterferenceHardDisk const *)arg1)->parDefs(); + { + try { + result = ((InterferenceHardDisk const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -42500,7 +47920,17 @@ SWIGINTERN PyObject *_wrap_InterferenceHardDisk_clone(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceHardDisk_clone" "', argument " "1"" of type '" "InterferenceHardDisk const *""'"); } arg1 = reinterpret_cast< InterferenceHardDisk * >(argp1); - result = (InterferenceHardDisk *)((InterferenceHardDisk const *)arg1)->clone(); + { + try { + result = (InterferenceHardDisk *)((InterferenceHardDisk const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceHardDisk, 0 | 0 ); return resultobj; fail: @@ -42523,7 +47953,17 @@ SWIGINTERN PyObject *_wrap_InterferenceHardDisk_className(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceHardDisk_className" "', argument " "1"" of type '" "InterferenceHardDisk const *""'"); } arg1 = reinterpret_cast< InterferenceHardDisk * >(argp1); - result = ((InterferenceHardDisk const *)arg1)->className(); + { + try { + result = ((InterferenceHardDisk const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -42546,7 +47986,17 @@ SWIGINTERN PyObject *_wrap_InterferenceHardDisk_particleDensity(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceHardDisk_particleDensity" "', argument " "1"" of type '" "InterferenceHardDisk const *""'"); } arg1 = reinterpret_cast< InterferenceHardDisk * >(argp1); - result = (double)((InterferenceHardDisk const *)arg1)->particleDensity(); + { + try { + result = (double)((InterferenceHardDisk const *)arg1)->particleDensity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -42569,7 +48019,17 @@ SWIGINTERN PyObject *_wrap_InterferenceHardDisk_radius(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceHardDisk_radius" "', argument " "1"" of type '" "InterferenceHardDisk const *""'"); } arg1 = reinterpret_cast< InterferenceHardDisk * >(argp1); - result = (double)((InterferenceHardDisk const *)arg1)->radius(); + { + try { + result = (double)((InterferenceHardDisk const *)arg1)->radius(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -42592,7 +48052,17 @@ SWIGINTERN PyObject *_wrap_InterferenceHardDisk_density(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceHardDisk_density" "', argument " "1"" of type '" "InterferenceHardDisk const *""'"); } arg1 = reinterpret_cast< InterferenceHardDisk * >(argp1); - result = (double)((InterferenceHardDisk const *)arg1)->density(); + { + try { + result = (double)((InterferenceHardDisk const *)arg1)->density(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -42615,7 +48085,17 @@ SWIGINTERN PyObject *_wrap_InterferenceHardDisk_validate(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceHardDisk_validate" "', argument " "1"" of type '" "InterferenceHardDisk const *""'"); } arg1 = reinterpret_cast< InterferenceHardDisk * >(argp1); - result = ((InterferenceHardDisk const *)arg1)->validate(); + { + try { + result = ((InterferenceHardDisk const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -42639,7 +48119,17 @@ SWIGINTERN PyObject *_wrap_new_InterferenceNone(PyObject *self, PyObject *args) InterferenceNone *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_InterferenceNone", 0, 0, 0)) SWIG_fail; - result = (InterferenceNone *)new InterferenceNone(); + { + try { + result = (InterferenceNone *)new InterferenceNone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceNone, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -42662,7 +48152,17 @@ SWIGINTERN PyObject *_wrap_InterferenceNone_clone(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceNone_clone" "', argument " "1"" of type '" "InterferenceNone const *""'"); } arg1 = reinterpret_cast< InterferenceNone * >(argp1); - result = (InterferenceNone *)((InterferenceNone const *)arg1)->clone(); + { + try { + result = (InterferenceNone *)((InterferenceNone const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceNone, 0 | 0 ); return resultobj; fail: @@ -42685,7 +48185,17 @@ SWIGINTERN PyObject *_wrap_InterferenceNone_className(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceNone_className" "', argument " "1"" of type '" "InterferenceNone const *""'"); } arg1 = reinterpret_cast< InterferenceNone * >(argp1); - result = ((InterferenceNone const *)arg1)->className(); + { + try { + result = ((InterferenceNone const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -42707,7 +48217,17 @@ SWIGINTERN PyObject *_wrap_delete_InterferenceNone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InterferenceNone" "', argument " "1"" of type '" "InterferenceNone *""'"); } arg1 = reinterpret_cast< InterferenceNone * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -42748,7 +48268,17 @@ SWIGINTERN PyObject *_wrap_new_InterferenceRadialParacrystal(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InterferenceRadialParacrystal" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (InterferenceRadialParacrystal *)new InterferenceRadialParacrystal(arg1,arg2); + { + try { + result = (InterferenceRadialParacrystal *)new InterferenceRadialParacrystal(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceRadialParacrystal, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -42771,7 +48301,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_clone(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_clone" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = (InterferenceRadialParacrystal *)((InterferenceRadialParacrystal const *)arg1)->clone(); + { + try { + result = (InterferenceRadialParacrystal *)((InterferenceRadialParacrystal const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterferenceRadialParacrystal, 0 | 0 ); return resultobj; fail: @@ -42794,7 +48334,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_className(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_className" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = ((InterferenceRadialParacrystal const *)arg1)->className(); + { + try { + result = ((InterferenceRadialParacrystal const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -42817,7 +48367,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_parDefs(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_parDefs" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = ((InterferenceRadialParacrystal const *)arg1)->parDefs(); + { + try { + result = ((InterferenceRadialParacrystal const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -42846,7 +48406,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_setKappa(PyObject *self SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InterferenceRadialParacrystal_setKappa" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setKappa(arg2); + { + try { + (arg1)->setKappa(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -42869,7 +48439,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_kappa(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_kappa" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = (double)((InterferenceRadialParacrystal const *)arg1)->kappa(); + { + try { + result = (double)((InterferenceRadialParacrystal const *)arg1)->kappa(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -42898,7 +48478,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_setDomainSize(PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InterferenceRadialParacrystal_setDomainSize" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setDomainSize(arg2); + { + try { + (arg1)->setDomainSize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -42921,7 +48511,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_domainSize(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_domainSize" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = (double)((InterferenceRadialParacrystal const *)arg1)->domainSize(); + { + try { + result = (double)((InterferenceRadialParacrystal const *)arg1)->domainSize(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -42951,7 +48551,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_FTPDF(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InterferenceRadialParacrystal_FTPDF" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((InterferenceRadialParacrystal const *)arg1)->FTPDF(arg2); + { + try { + result = ((InterferenceRadialParacrystal const *)arg1)->FTPDF(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -42983,7 +48593,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_setProbabilityDistribut SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterferenceRadialParacrystal_setProbabilityDistribution" "', argument " "2"" of type '" "IProfile1D const &""'"); } arg2 = reinterpret_cast< IProfile1D * >(argp2); - (arg1)->setProbabilityDistribution((IProfile1D const &)*arg2); + { + try { + (arg1)->setProbabilityDistribution((IProfile1D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43006,7 +48626,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_peakDistance(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_peakDistance" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = (double)((InterferenceRadialParacrystal const *)arg1)->peakDistance(); + { + try { + result = (double)((InterferenceRadialParacrystal const *)arg1)->peakDistance(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -43029,7 +48659,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_dampingLength(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_dampingLength" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = (double)((InterferenceRadialParacrystal const *)arg1)->dampingLength(); + { + try { + result = (double)((InterferenceRadialParacrystal const *)arg1)->dampingLength(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -43052,7 +48692,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_nodeChildren(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_nodeChildren" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = ((InterferenceRadialParacrystal const *)arg1)->nodeChildren(); + { + try { + result = ((InterferenceRadialParacrystal const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -43075,7 +48725,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_randomSample(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_randomSample" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = (double)((InterferenceRadialParacrystal const *)arg1)->randomSample(); + { + try { + result = (double)((InterferenceRadialParacrystal const *)arg1)->randomSample(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -43098,7 +48758,17 @@ SWIGINTERN PyObject *_wrap_InterferenceRadialParacrystal_validate(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterferenceRadialParacrystal_validate" "', argument " "1"" of type '" "InterferenceRadialParacrystal const *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - result = ((InterferenceRadialParacrystal const *)arg1)->validate(); + { + try { + result = ((InterferenceRadialParacrystal const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -43120,7 +48790,17 @@ SWIGINTERN PyObject *_wrap_delete_InterferenceRadialParacrystal(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InterferenceRadialParacrystal" "', argument " "1"" of type '" "InterferenceRadialParacrystal *""'"); } arg1 = reinterpret_cast< InterferenceRadialParacrystal * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43144,7 +48824,17 @@ SWIGINTERN PyObject *_wrap_new_ParticleLayout__SWIG_0(PyObject *self, Py_ssize_t ParticleLayout *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (ParticleLayout *)new ParticleLayout(); + { + try { + result = (ParticleLayout *)new ParticleLayout(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParticleLayout, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -43168,7 +48858,17 @@ SWIGINTERN PyObject *_wrap_new_ParticleLayout__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ParticleLayout" "', argument " "1"" of type '" "IParticle const &""'"); } arg1 = reinterpret_cast< IParticle * >(argp1); - result = (ParticleLayout *)new ParticleLayout((IParticle const &)*arg1); + { + try { + result = (ParticleLayout *)new ParticleLayout((IParticle const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParticleLayout, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -43219,7 +48919,17 @@ SWIGINTERN PyObject *_wrap_delete_ParticleLayout(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ParticleLayout" "', argument " "1"" of type '" "ParticleLayout *""'"); } arg1 = reinterpret_cast< ParticleLayout * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43242,7 +48952,17 @@ SWIGINTERN PyObject *_wrap_ParticleLayout_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParticleLayout_clone" "', argument " "1"" of type '" "ParticleLayout const *""'"); } arg1 = reinterpret_cast< ParticleLayout * >(argp1); - result = (ParticleLayout *)((ParticleLayout const *)arg1)->clone(); + { + try { + result = (ParticleLayout *)((ParticleLayout const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParticleLayout, 0 | 0 ); return resultobj; fail: @@ -43265,7 +48985,17 @@ SWIGINTERN PyObject *_wrap_ParticleLayout_className(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParticleLayout_className" "', argument " "1"" of type '" "ParticleLayout const *""'"); } arg1 = reinterpret_cast< ParticleLayout * >(argp1); - result = ((ParticleLayout const *)arg1)->className(); + { + try { + result = ((ParticleLayout const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -43304,7 +49034,17 @@ SWIGINTERN PyObject *_wrap_ParticleLayout_addParticle__SWIG_0(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ParticleLayout_addParticle" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->addParticle((IParticle const &)*arg2,arg3); + { + try { + (arg1)->addParticle((IParticle const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43335,7 +49075,17 @@ SWIGINTERN PyObject *_wrap_ParticleLayout_addParticle__SWIG_1(PyObject *self, Py SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParticleLayout_addParticle" "', argument " "2"" of type '" "IParticle const &""'"); } arg2 = reinterpret_cast< IParticle * >(argp2); - (arg1)->addParticle((IParticle const &)*arg2); + { + try { + (arg1)->addParticle((IParticle const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43417,7 +49167,17 @@ SWIGINTERN PyObject *_wrap_ParticleLayout_setInterference(PyObject *self, PyObje SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParticleLayout_setInterference" "', argument " "2"" of type '" "IInterference const &""'"); } arg2 = reinterpret_cast< IInterference * >(argp2); - (arg1)->setInterference((IInterference const &)*arg2); + { + try { + (arg1)->setInterference((IInterference const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43446,7 +49206,17 @@ SWIGINTERN PyObject *_wrap_ParticleLayout_setTotalParticleSurfaceDensity(PyObjec SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParticleLayout_setTotalParticleSurfaceDensity" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setTotalParticleSurfaceDensity(arg2); + { + try { + (arg1)->setTotalParticleSurfaceDensity(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43494,7 +49264,17 @@ SWIGINTERN PyObject *_wrap_new_LayerRoughness__SWIG_0(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LayerRoughness" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (LayerRoughness *)new LayerRoughness(arg1,arg2,arg3); + { + try { + result = (LayerRoughness *)new LayerRoughness(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LayerRoughness, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -43523,7 +49303,17 @@ SWIGINTERN PyObject *_wrap_new_LayerRoughness__SWIG_1(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LayerRoughness" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (LayerRoughness *)new LayerRoughness(arg1,arg2); + { + try { + result = (LayerRoughness *)new LayerRoughness(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LayerRoughness, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -43544,7 +49334,17 @@ SWIGINTERN PyObject *_wrap_new_LayerRoughness__SWIG_2(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LayerRoughness" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (LayerRoughness *)new LayerRoughness(arg1); + { + try { + result = (LayerRoughness *)new LayerRoughness(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LayerRoughness, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -43557,7 +49357,17 @@ SWIGINTERN PyObject *_wrap_new_LayerRoughness__SWIG_3(PyObject *self, Py_ssize_t LayerRoughness *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (LayerRoughness *)new LayerRoughness(); + { + try { + result = (LayerRoughness *)new LayerRoughness(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LayerRoughness, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -43651,7 +49461,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerRoughness_clone" "', argument " "1"" of type '" "LayerRoughness const *""'"); } arg1 = reinterpret_cast< LayerRoughness * >(argp1); - result = (LayerRoughness *)((LayerRoughness const *)arg1)->clone(); + { + try { + result = (LayerRoughness *)((LayerRoughness const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LayerRoughness, 0 | 0 ); return resultobj; fail: @@ -43674,7 +49494,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_className(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerRoughness_className" "', argument " "1"" of type '" "LayerRoughness const *""'"); } arg1 = reinterpret_cast< LayerRoughness * >(argp1); - result = ((LayerRoughness const *)arg1)->className(); + { + try { + result = ((LayerRoughness const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -43697,7 +49527,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_parDefs(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerRoughness_parDefs" "', argument " "1"" of type '" "LayerRoughness const *""'"); } arg1 = reinterpret_cast< LayerRoughness * >(argp1); - result = ((LayerRoughness const *)arg1)->parDefs(); + { + try { + result = ((LayerRoughness const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -43735,7 +49575,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_spectralFunction(PyObject *self, PyObj if (SWIG_IsNewObj(res2)) delete temp; } } - result = (double)((LayerRoughness const *)arg1)->spectralFunction(arg2); + { + try { + result = (double)((LayerRoughness const *)arg1)->spectralFunction(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -43773,7 +49623,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_corrFunction(PyObject *self, PyObject if (SWIG_IsNewObj(res2)) delete temp; } } - result = (double)((LayerRoughness const *)arg1)->corrFunction(arg2); + { + try { + result = (double)((LayerRoughness const *)arg1)->corrFunction(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -43802,7 +49662,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_setSigma(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerRoughness_setSigma" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setSigma(arg2); + { + try { + (arg1)->setSigma(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43825,7 +49695,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_sigma(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerRoughness_sigma" "', argument " "1"" of type '" "LayerRoughness const *""'"); } arg1 = reinterpret_cast< LayerRoughness * >(argp1); - result = (double)((LayerRoughness const *)arg1)->sigma(); + { + try { + result = (double)((LayerRoughness const *)arg1)->sigma(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -43854,7 +49734,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_setHurstParameter(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerRoughness_setHurstParameter" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setHurstParameter(arg2); + { + try { + (arg1)->setHurstParameter(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43877,7 +49767,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_hurst(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerRoughness_hurst" "', argument " "1"" of type '" "LayerRoughness const *""'"); } arg1 = reinterpret_cast< LayerRoughness * >(argp1); - result = (double)((LayerRoughness const *)arg1)->hurst(); + { + try { + result = (double)((LayerRoughness const *)arg1)->hurst(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -43906,7 +49806,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_setLatteralCorrLength(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LayerRoughness_setLatteralCorrLength" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setLatteralCorrLength(arg2); + { + try { + (arg1)->setLatteralCorrLength(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -43929,7 +49839,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_lateralCorrLength(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerRoughness_lateralCorrLength" "', argument " "1"" of type '" "LayerRoughness const *""'"); } arg1 = reinterpret_cast< LayerRoughness * >(argp1); - result = (double)((LayerRoughness const *)arg1)->lateralCorrLength(); + { + try { + result = (double)((LayerRoughness const *)arg1)->lateralCorrLength(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -43952,7 +49872,17 @@ SWIGINTERN PyObject *_wrap_LayerRoughness_validate(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerRoughness_validate" "', argument " "1"" of type '" "LayerRoughness const *""'"); } arg1 = reinterpret_cast< LayerRoughness * >(argp1); - result = ((LayerRoughness const *)arg1)->validate(); + { + try { + result = ((LayerRoughness const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -43974,7 +49904,17 @@ SWIGINTERN PyObject *_wrap_delete_LayerRoughness(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LayerRoughness" "', argument " "1"" of type '" "LayerRoughness *""'"); } arg1 = reinterpret_cast< LayerRoughness * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44022,7 +49962,17 @@ SWIGINTERN PyObject *_wrap_new_Layer__SWIG_0(PyObject *self, Py_ssize_t nobjs, P SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Layer" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Layer *)new Layer(arg1,arg2); + { + try { + result = (Layer *)new Layer(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Layer, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -44051,7 +50001,17 @@ SWIGINTERN PyObject *_wrap_new_Layer__SWIG_1(PyObject *self, Py_ssize_t nobjs, P if (SWIG_IsNewObj(res1)) delete temp; } } - result = (Layer *)new Layer(arg1); + { + try { + result = (Layer *)new Layer(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Layer, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -44113,7 +50073,17 @@ SWIGINTERN PyObject *_wrap_delete_Layer(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Layer" "', argument " "1"" of type '" "Layer *""'"); } arg1 = reinterpret_cast< Layer * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44136,7 +50106,17 @@ SWIGINTERN PyObject *_wrap_Layer_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_clone" "', argument " "1"" of type '" "Layer const *""'"); } arg1 = reinterpret_cast< Layer * >(argp1); - result = (Layer *)((Layer const *)arg1)->clone(); + { + try { + result = (Layer *)((Layer const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Layer, 0 | 0 ); return resultobj; fail: @@ -44159,7 +50139,17 @@ SWIGINTERN PyObject *_wrap_Layer_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_className" "', argument " "1"" of type '" "Layer const *""'"); } arg1 = reinterpret_cast< Layer * >(argp1); - result = ((Layer const *)arg1)->className(); + { + try { + result = ((Layer const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -44182,7 +50172,17 @@ SWIGINTERN PyObject *_wrap_Layer_nodeChildren(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_nodeChildren" "', argument " "1"" of type '" "Layer const *""'"); } arg1 = reinterpret_cast< Layer * >(argp1); - result = ((Layer const *)arg1)->nodeChildren(); + { + try { + result = ((Layer const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -44214,7 +50214,17 @@ SWIGINTERN PyObject *_wrap_Layer_addLayout(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Layer_addLayout" "', argument " "2"" of type '" "ParticleLayout const &""'"); } arg2 = reinterpret_cast< ParticleLayout * >(argp2); - (arg1)->addLayout((ParticleLayout const &)*arg2); + { + try { + (arg1)->addLayout((ParticleLayout const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44243,7 +50253,17 @@ SWIGINTERN PyObject *_wrap_Layer_setNumberOfSlices(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_setNumberOfSlices" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); - (arg1)->setNumberOfSlices(arg2); + { + try { + (arg1)->setNumberOfSlices(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44267,7 +50287,17 @@ SWIGINTERN PyObject *_wrap_new_MultiLayer(PyObject *self, PyObject *args) { MultiLayer *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_MultiLayer", 0, 0, 0)) SWIG_fail; - result = (MultiLayer *)new MultiLayer(); + { + try { + result = (MultiLayer *)new MultiLayer(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiLayer, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -44289,7 +50319,17 @@ SWIGINTERN PyObject *_wrap_delete_MultiLayer(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiLayer" "', argument " "1"" of type '" "MultiLayer *""'"); } arg1 = reinterpret_cast< MultiLayer * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44312,7 +50352,17 @@ SWIGINTERN PyObject *_wrap_MultiLayer_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiLayer_clone" "', argument " "1"" of type '" "MultiLayer const *""'"); } arg1 = reinterpret_cast< MultiLayer * >(argp1); - result = (MultiLayer *)((MultiLayer const *)arg1)->clone(); + { + try { + result = (MultiLayer *)((MultiLayer const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiLayer, 0 | 0 ); return resultobj; fail: @@ -44335,7 +50385,17 @@ SWIGINTERN PyObject *_wrap_MultiLayer_className(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiLayer_className" "', argument " "1"" of type '" "MultiLayer const *""'"); } arg1 = reinterpret_cast< MultiLayer * >(argp1); - result = ((MultiLayer const *)arg1)->className(); + { + try { + result = ((MultiLayer const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -44367,7 +50427,17 @@ SWIGINTERN PyObject *_wrap_MultiLayer_addLayer(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiLayer_addLayer" "', argument " "2"" of type '" "Layer const &""'"); } arg2 = reinterpret_cast< Layer * >(argp2); - (arg1)->addLayer((Layer const &)*arg2); + { + try { + (arg1)->addLayer((Layer const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44410,7 +50480,17 @@ SWIGINTERN PyObject *_wrap_MultiLayer_addLayerWithTopRoughness(PyObject *self, P SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiLayer_addLayerWithTopRoughness" "', argument " "3"" of type '" "LayerRoughness const &""'"); } arg3 = reinterpret_cast< LayerRoughness * >(argp3); - (arg1)->addLayerWithTopRoughness((Layer const &)*arg2,(LayerRoughness const &)*arg3); + { + try { + (arg1)->addLayerWithTopRoughness((Layer const &)*arg2,(LayerRoughness const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44439,7 +50519,17 @@ SWIGINTERN PyObject *_wrap_MultiLayer_setRoughnessModel(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiLayer_setRoughnessModel" "', argument " "2"" of type '" "RoughnessModel""'"); } arg2 = static_cast< RoughnessModel >(val2); - (arg1)->setRoughnessModel(arg2); + { + try { + (arg1)->setRoughnessModel(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44468,7 +50558,17 @@ SWIGINTERN PyObject *_wrap_MultiLayer_setCrossCorrLength(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiLayer_setCrossCorrLength" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setCrossCorrLength(arg2); + { + try { + (arg1)->setCrossCorrLength(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44505,7 +50605,17 @@ SWIGINTERN PyObject *_wrap_MultiLayer_setExternalField(PyObject *self, PyObject if (SWIG_IsNewObj(res2)) delete temp; } } - (arg1)->setExternalField(arg2); + { + try { + (arg1)->setExternalField(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44539,7 +50649,17 @@ SWIGINTERN PyObject *_wrap_MultiLayer_setSampleName(PyObject *self, PyObject *ar } arg2 = ptr; } - (arg1)->setSampleName((std::string const &)*arg2); + { + try { + (arg1)->setSampleName((std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -44574,7 +50694,17 @@ SWIGINTERN PyObject *_wrap_delete_RoughnessModel(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RoughnessModel" "', argument " "1"" of type '" "RoughnessModelWrap *""'"); } arg1 = reinterpret_cast< RoughnessModelWrap * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44603,7 +50733,17 @@ SWIGINTERN PyObject *_wrap_delete_IFormFactorPolyhedron(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IFormFactorPolyhedron" "', argument " "1"" of type '" "IFormFactorPolyhedron *""'"); } arg1 = reinterpret_cast< IFormFactorPolyhedron * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44626,7 +50766,17 @@ SWIGINTERN PyObject *_wrap_IFormFactorPolyhedron_volume(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFormFactorPolyhedron_volume" "', argument " "1"" of type '" "IFormFactorPolyhedron const *""'"); } arg1 = reinterpret_cast< IFormFactorPolyhedron * >(argp1); - result = (double)((IFormFactorPolyhedron const *)arg1)->volume(); + { + try { + result = (double)((IFormFactorPolyhedron const *)arg1)->volume(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -44649,7 +50799,17 @@ SWIGINTERN PyObject *_wrap_IFormFactorPolyhedron_radialExtension(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFormFactorPolyhedron_radialExtension" "', argument " "1"" of type '" "IFormFactorPolyhedron const *""'"); } arg1 = reinterpret_cast< IFormFactorPolyhedron * >(argp1); - result = (double)((IFormFactorPolyhedron const *)arg1)->radialExtension(); + { + try { + result = (double)((IFormFactorPolyhedron const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -44687,7 +50847,17 @@ SWIGINTERN PyObject *_wrap_IFormFactorPolyhedron_formfactor(PyObject *self, PyOb if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((IFormFactorPolyhedron const *)arg1)->formfactor(arg2); + { + try { + result = ((IFormFactorPolyhedron const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -44717,7 +50887,17 @@ SWIGINTERN PyObject *_wrap_IFormFactorPolyhedron_spanZ(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IFormFactorPolyhedron_spanZ" "', argument " "2"" of type '" "IRotation const *""'"); } arg2 = reinterpret_cast< IRotation * >(argp2); - result = ((IFormFactorPolyhedron const *)arg1)->spanZ((IRotation const *)arg2); + { + try { + result = ((IFormFactorPolyhedron const *)arg1)->spanZ((IRotation const *)arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Span(result)), SWIGTYPE_p_Span, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -44746,7 +50926,17 @@ SWIGINTERN PyObject *_wrap_delete_IFormFactorPrism(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IFormFactorPrism" "', argument " "1"" of type '" "IFormFactorPrism *""'"); } arg1 = reinterpret_cast< IFormFactorPrism * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44769,7 +50959,17 @@ SWIGINTERN PyObject *_wrap_IFormFactorPrism_height(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFormFactorPrism_height" "', argument " "1"" of type '" "IFormFactorPrism const *""'"); } arg1 = reinterpret_cast< IFormFactorPrism * >(argp1); - result = (double)((IFormFactorPrism const *)arg1)->height(); + { + try { + result = (double)((IFormFactorPrism const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -44799,7 +50999,17 @@ SWIGINTERN PyObject *_wrap_IProfileRipple_length(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfileRipple_length" "', argument " "1"" of type '" "IProfileRipple const *""'"); } arg1 = reinterpret_cast< IProfileRipple * >(argp1); - result = (double)((IProfileRipple const *)arg1)->length(); + { + try { + result = (double)((IProfileRipple const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -44822,7 +51032,17 @@ SWIGINTERN PyObject *_wrap_IProfileRipple_height(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfileRipple_height" "', argument " "1"" of type '" "IProfileRipple const *""'"); } arg1 = reinterpret_cast< IProfileRipple * >(argp1); - result = (double)((IProfileRipple const *)arg1)->height(); + { + try { + result = (double)((IProfileRipple const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -44845,7 +51065,17 @@ SWIGINTERN PyObject *_wrap_IProfileRipple_width(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfileRipple_width" "', argument " "1"" of type '" "IProfileRipple const *""'"); } arg1 = reinterpret_cast< IProfileRipple * >(argp1); - result = (double)((IProfileRipple const *)arg1)->width(); + { + try { + result = (double)((IProfileRipple const *)arg1)->width(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -44868,7 +51098,17 @@ SWIGINTERN PyObject *_wrap_IProfileRipple_radialExtension(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfileRipple_radialExtension" "', argument " "1"" of type '" "IProfileRipple const *""'"); } arg1 = reinterpret_cast< IProfileRipple * >(argp1); - result = (double)((IProfileRipple const *)arg1)->radialExtension(); + { + try { + result = (double)((IProfileRipple const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -44906,7 +51146,17 @@ SWIGINTERN PyObject *_wrap_IProfileRipple_formfactor(PyObject *self, PyObject *a if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((IProfileRipple const *)arg1)->formfactor(arg2); + { + try { + result = ((IProfileRipple const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -44929,7 +51179,17 @@ SWIGINTERN PyObject *_wrap_IProfileRipple_validate(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IProfileRipple_validate" "', argument " "1"" of type '" "IProfileRipple const *""'"); } arg1 = reinterpret_cast< IProfileRipple * >(argp1); - result = ((IProfileRipple const *)arg1)->validate(); + { + try { + result = ((IProfileRipple const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -44951,7 +51211,17 @@ SWIGINTERN PyObject *_wrap_delete_IProfileRipple(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IProfileRipple" "', argument " "1"" of type '" "IProfileRipple *""'"); } arg1 = reinterpret_cast< IProfileRipple * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44980,7 +51250,17 @@ SWIGINTERN PyObject *_wrap_delete_IProfileRectangularRipple(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IProfileRectangularRipple" "', argument " "1"" of type '" "IProfileRectangularRipple *""'"); } arg1 = reinterpret_cast< IProfileRectangularRipple * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -45009,7 +51289,17 @@ SWIGINTERN PyObject *_wrap_delete_ICosineRipple(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ICosineRipple" "', argument " "1"" of type '" "ICosineRipple *""'"); } arg1 = reinterpret_cast< ICosineRipple * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -45039,7 +51329,17 @@ SWIGINTERN PyObject *_wrap_ISawtoothRipple_asymmetry(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISawtoothRipple_asymmetry" "', argument " "1"" of type '" "ISawtoothRipple const *""'"); } arg1 = reinterpret_cast< ISawtoothRipple * >(argp1); - result = (double)((ISawtoothRipple const *)arg1)->asymmetry(); + { + try { + result = (double)((ISawtoothRipple const *)arg1)->asymmetry(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -45061,7 +51361,17 @@ SWIGINTERN PyObject *_wrap_delete_ISawtoothRipple(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ISawtoothRipple" "', argument " "1"" of type '" "ISawtoothRipple *""'"); } arg1 = reinterpret_cast< ISawtoothRipple * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -45105,7 +51415,17 @@ SWIGINTERN PyObject *_wrap_new_Box__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyO SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Box" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Box *)new Box(arg1,arg2,arg3); + { + try { + result = (Box *)new Box(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45128,7 +51448,17 @@ SWIGINTERN PyObject *_wrap_new_Box__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyO arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Box *)new Box(arg1); + { + try { + result = (Box *)new Box(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45199,7 +51529,17 @@ SWIGINTERN PyObject *_wrap_Box_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_clone" "', argument " "1"" of type '" "Box const *""'"); } arg1 = reinterpret_cast< Box * >(argp1); - result = (Box *)((Box const *)arg1)->clone(); + { + try { + result = (Box *)((Box const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); return resultobj; fail: @@ -45222,7 +51562,17 @@ SWIGINTERN PyObject *_wrap_Box_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_className" "', argument " "1"" of type '" "Box const *""'"); } arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->className(); + { + try { + result = ((Box const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -45245,7 +51595,17 @@ SWIGINTERN PyObject *_wrap_Box_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_parDefs" "', argument " "1"" of type '" "Box const *""'"); } arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->parDefs(); + { + try { + result = ((Box const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -45268,7 +51628,17 @@ SWIGINTERN PyObject *_wrap_Box_length(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_length" "', argument " "1"" of type '" "Box const *""'"); } arg1 = reinterpret_cast< Box * >(argp1); - result = (double)((Box const *)arg1)->length(); + { + try { + result = (double)((Box const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -45291,7 +51661,17 @@ SWIGINTERN PyObject *_wrap_Box_width(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_width" "', argument " "1"" of type '" "Box const *""'"); } arg1 = reinterpret_cast< Box * >(argp1); - result = (double)((Box const *)arg1)->width(); + { + try { + result = (double)((Box const *)arg1)->width(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -45314,7 +51694,17 @@ SWIGINTERN PyObject *_wrap_Box_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_height" "', argument " "1"" of type '" "Box const *""'"); } arg1 = reinterpret_cast< Box * >(argp1); - result = (double)((Box const *)arg1)->height(); + { + try { + result = (double)((Box const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -45336,7 +51726,17 @@ SWIGINTERN PyObject *_wrap_delete_Box(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Box" "', argument " "1"" of type '" "Box *""'"); } arg1 = reinterpret_cast< Box * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -45376,7 +51776,17 @@ SWIGINTERN PyObject *_wrap_new_Prism3__SWIG_0(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Prism3" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Prism3 *)new Prism3(arg1,arg2); + { + try { + result = (Prism3 *)new Prism3(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prism3, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45399,7 +51809,17 @@ SWIGINTERN PyObject *_wrap_new_Prism3__SWIG_1(PyObject *self, Py_ssize_t nobjs, arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Prism3 *)new Prism3(arg1); + { + try { + result = (Prism3 *)new Prism3(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prism3, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45464,7 +51884,17 @@ SWIGINTERN PyObject *_wrap_Prism3_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism3_clone" "', argument " "1"" of type '" "Prism3 const *""'"); } arg1 = reinterpret_cast< Prism3 * >(argp1); - result = (Prism3 *)((Prism3 const *)arg1)->clone(); + { + try { + result = (Prism3 *)((Prism3 const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prism3, 0 | 0 ); return resultobj; fail: @@ -45487,7 +51917,17 @@ SWIGINTERN PyObject *_wrap_Prism3_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism3_className" "', argument " "1"" of type '" "Prism3 const *""'"); } arg1 = reinterpret_cast< Prism3 * >(argp1); - result = ((Prism3 const *)arg1)->className(); + { + try { + result = ((Prism3 const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -45510,7 +51950,17 @@ SWIGINTERN PyObject *_wrap_Prism3_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism3_parDefs" "', argument " "1"" of type '" "Prism3 const *""'"); } arg1 = reinterpret_cast< Prism3 * >(argp1); - result = ((Prism3 const *)arg1)->parDefs(); + { + try { + result = ((Prism3 const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -45533,7 +51983,17 @@ SWIGINTERN PyObject *_wrap_Prism3_baseEdge(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism3_baseEdge" "', argument " "1"" of type '" "Prism3 const *""'"); } arg1 = reinterpret_cast< Prism3 * >(argp1); - result = (double)((Prism3 const *)arg1)->baseEdge(); + { + try { + result = (double)((Prism3 const *)arg1)->baseEdge(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -45556,7 +52016,17 @@ SWIGINTERN PyObject *_wrap_Prism3_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism3_height" "', argument " "1"" of type '" "Prism3 const *""'"); } arg1 = reinterpret_cast< Prism3 * >(argp1); - result = (double)((Prism3 const *)arg1)->height(); + { + try { + result = (double)((Prism3 const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -45578,7 +52048,17 @@ SWIGINTERN PyObject *_wrap_delete_Prism3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Prism3" "', argument " "1"" of type '" "Prism3 *""'"); } arg1 = reinterpret_cast< Prism3 * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -45618,7 +52098,17 @@ SWIGINTERN PyObject *_wrap_new_Prism6__SWIG_0(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Prism6" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Prism6 *)new Prism6(arg1,arg2); + { + try { + result = (Prism6 *)new Prism6(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prism6, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45641,7 +52131,17 @@ SWIGINTERN PyObject *_wrap_new_Prism6__SWIG_1(PyObject *self, Py_ssize_t nobjs, arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Prism6 *)new Prism6(arg1); + { + try { + result = (Prism6 *)new Prism6(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prism6, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45706,7 +52206,17 @@ SWIGINTERN PyObject *_wrap_Prism6_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism6_clone" "', argument " "1"" of type '" "Prism6 const *""'"); } arg1 = reinterpret_cast< Prism6 * >(argp1); - result = (Prism6 *)((Prism6 const *)arg1)->clone(); + { + try { + result = (Prism6 *)((Prism6 const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Prism6, 0 | 0 ); return resultobj; fail: @@ -45729,7 +52239,17 @@ SWIGINTERN PyObject *_wrap_Prism6_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism6_className" "', argument " "1"" of type '" "Prism6 const *""'"); } arg1 = reinterpret_cast< Prism6 * >(argp1); - result = ((Prism6 const *)arg1)->className(); + { + try { + result = ((Prism6 const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -45752,7 +52272,17 @@ SWIGINTERN PyObject *_wrap_Prism6_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism6_parDefs" "', argument " "1"" of type '" "Prism6 const *""'"); } arg1 = reinterpret_cast< Prism6 * >(argp1); - result = ((Prism6 const *)arg1)->parDefs(); + { + try { + result = ((Prism6 const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -45775,7 +52305,17 @@ SWIGINTERN PyObject *_wrap_Prism6_baseEdge(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism6_baseEdge" "', argument " "1"" of type '" "Prism6 const *""'"); } arg1 = reinterpret_cast< Prism6 * >(argp1); - result = (double)((Prism6 const *)arg1)->baseEdge(); + { + try { + result = (double)((Prism6 const *)arg1)->baseEdge(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -45798,7 +52338,17 @@ SWIGINTERN PyObject *_wrap_Prism6_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prism6_height" "', argument " "1"" of type '" "Prism6 const *""'"); } arg1 = reinterpret_cast< Prism6 * >(argp1); - result = (double)((Prism6 const *)arg1)->height(); + { + try { + result = (double)((Prism6 const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -45820,7 +52370,17 @@ SWIGINTERN PyObject *_wrap_delete_Prism6(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Prism6" "', argument " "1"" of type '" "Prism6 *""'"); } arg1 = reinterpret_cast< Prism6 * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -45852,7 +52412,17 @@ SWIGINTERN PyObject *_wrap_new_PlatonicTetrahedron__SWIG_0(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PlatonicTetrahedron" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (PlatonicTetrahedron *)new PlatonicTetrahedron(arg1); + { + try { + result = (PlatonicTetrahedron *)new PlatonicTetrahedron(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PlatonicTetrahedron, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45875,7 +52445,17 @@ SWIGINTERN PyObject *_wrap_new_PlatonicTetrahedron__SWIG_1(PyObject *self, Py_ss arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (PlatonicTetrahedron *)new PlatonicTetrahedron(arg1); + { + try { + result = (PlatonicTetrahedron *)new PlatonicTetrahedron(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PlatonicTetrahedron, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -45934,7 +52514,17 @@ SWIGINTERN PyObject *_wrap_PlatonicTetrahedron_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicTetrahedron_clone" "', argument " "1"" of type '" "PlatonicTetrahedron const *""'"); } arg1 = reinterpret_cast< PlatonicTetrahedron * >(argp1); - result = (PlatonicTetrahedron *)((PlatonicTetrahedron const *)arg1)->clone(); + { + try { + result = (PlatonicTetrahedron *)((PlatonicTetrahedron const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PlatonicTetrahedron, 0 | 0 ); return resultobj; fail: @@ -45957,7 +52547,17 @@ SWIGINTERN PyObject *_wrap_PlatonicTetrahedron_className(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicTetrahedron_className" "', argument " "1"" of type '" "PlatonicTetrahedron const *""'"); } arg1 = reinterpret_cast< PlatonicTetrahedron * >(argp1); - result = ((PlatonicTetrahedron const *)arg1)->className(); + { + try { + result = ((PlatonicTetrahedron const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -45980,7 +52580,17 @@ SWIGINTERN PyObject *_wrap_PlatonicTetrahedron_parDefs(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicTetrahedron_parDefs" "', argument " "1"" of type '" "PlatonicTetrahedron const *""'"); } arg1 = reinterpret_cast< PlatonicTetrahedron * >(argp1); - result = ((PlatonicTetrahedron const *)arg1)->parDefs(); + { + try { + result = ((PlatonicTetrahedron const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -46003,7 +52613,17 @@ SWIGINTERN PyObject *_wrap_PlatonicTetrahedron_edge(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicTetrahedron_edge" "', argument " "1"" of type '" "PlatonicTetrahedron const *""'"); } arg1 = reinterpret_cast< PlatonicTetrahedron * >(argp1); - result = (double)((PlatonicTetrahedron const *)arg1)->edge(); + { + try { + result = (double)((PlatonicTetrahedron const *)arg1)->edge(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -46026,7 +52646,17 @@ SWIGINTERN PyObject *_wrap_PlatonicTetrahedron_height(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicTetrahedron_height" "', argument " "1"" of type '" "PlatonicTetrahedron const *""'"); } arg1 = reinterpret_cast< PlatonicTetrahedron * >(argp1); - result = (double)((PlatonicTetrahedron const *)arg1)->height(); + { + try { + result = (double)((PlatonicTetrahedron const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -46048,7 +52678,17 @@ SWIGINTERN PyObject *_wrap_delete_PlatonicTetrahedron(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PlatonicTetrahedron" "', argument " "1"" of type '" "PlatonicTetrahedron *""'"); } arg1 = reinterpret_cast< PlatonicTetrahedron * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -46080,7 +52720,17 @@ SWIGINTERN PyObject *_wrap_new_PlatonicOctahedron__SWIG_0(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PlatonicOctahedron" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (PlatonicOctahedron *)new PlatonicOctahedron(arg1); + { + try { + result = (PlatonicOctahedron *)new PlatonicOctahedron(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PlatonicOctahedron, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -46103,7 +52753,17 @@ SWIGINTERN PyObject *_wrap_new_PlatonicOctahedron__SWIG_1(PyObject *self, Py_ssi arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (PlatonicOctahedron *)new PlatonicOctahedron(arg1); + { + try { + result = (PlatonicOctahedron *)new PlatonicOctahedron(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PlatonicOctahedron, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -46162,7 +52822,17 @@ SWIGINTERN PyObject *_wrap_PlatonicOctahedron_clone(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicOctahedron_clone" "', argument " "1"" of type '" "PlatonicOctahedron const *""'"); } arg1 = reinterpret_cast< PlatonicOctahedron * >(argp1); - result = (PlatonicOctahedron *)((PlatonicOctahedron const *)arg1)->clone(); + { + try { + result = (PlatonicOctahedron *)((PlatonicOctahedron const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PlatonicOctahedron, 0 | 0 ); return resultobj; fail: @@ -46185,7 +52855,17 @@ SWIGINTERN PyObject *_wrap_PlatonicOctahedron_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicOctahedron_className" "', argument " "1"" of type '" "PlatonicOctahedron const *""'"); } arg1 = reinterpret_cast< PlatonicOctahedron * >(argp1); - result = ((PlatonicOctahedron const *)arg1)->className(); + { + try { + result = ((PlatonicOctahedron const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -46208,7 +52888,17 @@ SWIGINTERN PyObject *_wrap_PlatonicOctahedron_parDefs(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicOctahedron_parDefs" "', argument " "1"" of type '" "PlatonicOctahedron const *""'"); } arg1 = reinterpret_cast< PlatonicOctahedron * >(argp1); - result = ((PlatonicOctahedron const *)arg1)->parDefs(); + { + try { + result = ((PlatonicOctahedron const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -46231,7 +52921,17 @@ SWIGINTERN PyObject *_wrap_PlatonicOctahedron_edge(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicOctahedron_edge" "', argument " "1"" of type '" "PlatonicOctahedron const *""'"); } arg1 = reinterpret_cast< PlatonicOctahedron * >(argp1); - result = (double)((PlatonicOctahedron const *)arg1)->edge(); + { + try { + result = (double)((PlatonicOctahedron const *)arg1)->edge(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -46254,7 +52954,17 @@ SWIGINTERN PyObject *_wrap_PlatonicOctahedron_height(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatonicOctahedron_height" "', argument " "1"" of type '" "PlatonicOctahedron const *""'"); } arg1 = reinterpret_cast< PlatonicOctahedron * >(argp1); - result = (double)((PlatonicOctahedron const *)arg1)->height(); + { + try { + result = (double)((PlatonicOctahedron const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -46276,7 +52986,17 @@ SWIGINTERN PyObject *_wrap_delete_PlatonicOctahedron(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PlatonicOctahedron" "', argument " "1"" of type '" "PlatonicOctahedron *""'"); } arg1 = reinterpret_cast< PlatonicOctahedron * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -46308,7 +53028,17 @@ SWIGINTERN PyObject *_wrap_new_Dodecahedron__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Dodecahedron" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (Dodecahedron *)new Dodecahedron(arg1); + { + try { + result = (Dodecahedron *)new Dodecahedron(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Dodecahedron, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -46331,7 +53061,17 @@ SWIGINTERN PyObject *_wrap_new_Dodecahedron__SWIG_1(PyObject *self, Py_ssize_t n arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Dodecahedron *)new Dodecahedron(arg1); + { + try { + result = (Dodecahedron *)new Dodecahedron(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Dodecahedron, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -46390,7 +53130,17 @@ SWIGINTERN PyObject *_wrap_Dodecahedron_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dodecahedron_clone" "', argument " "1"" of type '" "Dodecahedron const *""'"); } arg1 = reinterpret_cast< Dodecahedron * >(argp1); - result = (Dodecahedron *)((Dodecahedron const *)arg1)->clone(); + { + try { + result = (Dodecahedron *)((Dodecahedron const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Dodecahedron, 0 | 0 ); return resultobj; fail: @@ -46413,7 +53163,17 @@ SWIGINTERN PyObject *_wrap_Dodecahedron_className(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dodecahedron_className" "', argument " "1"" of type '" "Dodecahedron const *""'"); } arg1 = reinterpret_cast< Dodecahedron * >(argp1); - result = ((Dodecahedron const *)arg1)->className(); + { + try { + result = ((Dodecahedron const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -46436,7 +53196,17 @@ SWIGINTERN PyObject *_wrap_Dodecahedron_parDefs(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dodecahedron_parDefs" "', argument " "1"" of type '" "Dodecahedron const *""'"); } arg1 = reinterpret_cast< Dodecahedron * >(argp1); - result = ((Dodecahedron const *)arg1)->parDefs(); + { + try { + result = ((Dodecahedron const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -46459,7 +53229,17 @@ SWIGINTERN PyObject *_wrap_Dodecahedron_edge(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dodecahedron_edge" "', argument " "1"" of type '" "Dodecahedron const *""'"); } arg1 = reinterpret_cast< Dodecahedron * >(argp1); - result = (double)((Dodecahedron const *)arg1)->edge(); + { + try { + result = (double)((Dodecahedron const *)arg1)->edge(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -46481,7 +53261,17 @@ SWIGINTERN PyObject *_wrap_delete_Dodecahedron(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dodecahedron" "', argument " "1"" of type '" "Dodecahedron *""'"); } arg1 = reinterpret_cast< Dodecahedron * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -46513,7 +53303,17 @@ SWIGINTERN PyObject *_wrap_new_Icosahedron__SWIG_0(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Icosahedron" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (Icosahedron *)new Icosahedron(arg1); + { + try { + result = (Icosahedron *)new Icosahedron(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Icosahedron, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -46536,7 +53336,17 @@ SWIGINTERN PyObject *_wrap_new_Icosahedron__SWIG_1(PyObject *self, Py_ssize_t no arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Icosahedron *)new Icosahedron(arg1); + { + try { + result = (Icosahedron *)new Icosahedron(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Icosahedron, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -46595,7 +53405,17 @@ SWIGINTERN PyObject *_wrap_Icosahedron_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Icosahedron_clone" "', argument " "1"" of type '" "Icosahedron const *""'"); } arg1 = reinterpret_cast< Icosahedron * >(argp1); - result = (Icosahedron *)((Icosahedron const *)arg1)->clone(); + { + try { + result = (Icosahedron *)((Icosahedron const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Icosahedron, 0 | 0 ); return resultobj; fail: @@ -46618,7 +53438,17 @@ SWIGINTERN PyObject *_wrap_Icosahedron_className(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Icosahedron_className" "', argument " "1"" of type '" "Icosahedron const *""'"); } arg1 = reinterpret_cast< Icosahedron * >(argp1); - result = ((Icosahedron const *)arg1)->className(); + { + try { + result = ((Icosahedron const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -46641,7 +53471,17 @@ SWIGINTERN PyObject *_wrap_Icosahedron_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Icosahedron_parDefs" "', argument " "1"" of type '" "Icosahedron const *""'"); } arg1 = reinterpret_cast< Icosahedron * >(argp1); - result = ((Icosahedron const *)arg1)->parDefs(); + { + try { + result = ((Icosahedron const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -46664,7 +53504,17 @@ SWIGINTERN PyObject *_wrap_Icosahedron_edge(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Icosahedron_edge" "', argument " "1"" of type '" "Icosahedron const *""'"); } arg1 = reinterpret_cast< Icosahedron * >(argp1); - result = (double)((Icosahedron const *)arg1)->edge(); + { + try { + result = (double)((Icosahedron const *)arg1)->edge(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -46686,7 +53536,17 @@ SWIGINTERN PyObject *_wrap_delete_Icosahedron(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Icosahedron" "', argument " "1"" of type '" "Icosahedron *""'"); } arg1 = reinterpret_cast< Icosahedron * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -46742,7 +53602,17 @@ SWIGINTERN PyObject *_wrap_new_Pyramid2__SWIG_0(PyObject *self, Py_ssize_t nobjs SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Pyramid2" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (Pyramid2 *)new Pyramid2(arg1,arg2,arg3,arg4); + { + try { + result = (Pyramid2 *)new Pyramid2(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid2, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -46765,7 +53635,17 @@ SWIGINTERN PyObject *_wrap_new_Pyramid2__SWIG_1(PyObject *self, Py_ssize_t nobjs arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Pyramid2 *)new Pyramid2(arg1); + { + try { + result = (Pyramid2 *)new Pyramid2(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid2, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -46842,7 +53722,17 @@ SWIGINTERN PyObject *_wrap_Pyramid2_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid2_clone" "', argument " "1"" of type '" "Pyramid2 const *""'"); } arg1 = reinterpret_cast< Pyramid2 * >(argp1); - result = (Pyramid2 *)((Pyramid2 const *)arg1)->clone(); + { + try { + result = (Pyramid2 *)((Pyramid2 const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid2, 0 | 0 ); return resultobj; fail: @@ -46865,7 +53755,17 @@ SWIGINTERN PyObject *_wrap_Pyramid2_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid2_className" "', argument " "1"" of type '" "Pyramid2 const *""'"); } arg1 = reinterpret_cast< Pyramid2 * >(argp1); - result = ((Pyramid2 const *)arg1)->className(); + { + try { + result = ((Pyramid2 const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -46888,7 +53788,17 @@ SWIGINTERN PyObject *_wrap_Pyramid2_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid2_parDefs" "', argument " "1"" of type '" "Pyramid2 const *""'"); } arg1 = reinterpret_cast< Pyramid2 * >(argp1); - result = ((Pyramid2 const *)arg1)->parDefs(); + { + try { + result = ((Pyramid2 const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -46911,7 +53821,17 @@ SWIGINTERN PyObject *_wrap_Pyramid2_length(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid2_length" "', argument " "1"" of type '" "Pyramid2 const *""'"); } arg1 = reinterpret_cast< Pyramid2 * >(argp1); - result = (double)((Pyramid2 const *)arg1)->length(); + { + try { + result = (double)((Pyramid2 const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -46934,7 +53854,17 @@ SWIGINTERN PyObject *_wrap_Pyramid2_width(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid2_width" "', argument " "1"" of type '" "Pyramid2 const *""'"); } arg1 = reinterpret_cast< Pyramid2 * >(argp1); - result = (double)((Pyramid2 const *)arg1)->width(); + { + try { + result = (double)((Pyramid2 const *)arg1)->width(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -46957,7 +53887,17 @@ SWIGINTERN PyObject *_wrap_Pyramid2_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid2_height" "', argument " "1"" of type '" "Pyramid2 const *""'"); } arg1 = reinterpret_cast< Pyramid2 * >(argp1); - result = (double)((Pyramid2 const *)arg1)->height(); + { + try { + result = (double)((Pyramid2 const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -46980,7 +53920,17 @@ SWIGINTERN PyObject *_wrap_Pyramid2_alpha(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid2_alpha" "', argument " "1"" of type '" "Pyramid2 const *""'"); } arg1 = reinterpret_cast< Pyramid2 * >(argp1); - result = (double)((Pyramid2 const *)arg1)->alpha(); + { + try { + result = (double)((Pyramid2 const *)arg1)->alpha(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47002,7 +53952,17 @@ SWIGINTERN PyObject *_wrap_delete_Pyramid2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Pyramid2" "', argument " "1"" of type '" "Pyramid2 *""'"); } arg1 = reinterpret_cast< Pyramid2 * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -47050,7 +54010,17 @@ SWIGINTERN PyObject *_wrap_new_Pyramid3__SWIG_0(PyObject *self, Py_ssize_t nobjs SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Pyramid3" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Pyramid3 *)new Pyramid3(arg1,arg2,arg3); + { + try { + result = (Pyramid3 *)new Pyramid3(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid3, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -47073,7 +54043,17 @@ SWIGINTERN PyObject *_wrap_new_Pyramid3__SWIG_1(PyObject *self, Py_ssize_t nobjs arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Pyramid3 *)new Pyramid3(arg1); + { + try { + result = (Pyramid3 *)new Pyramid3(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid3, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -47144,7 +54124,17 @@ SWIGINTERN PyObject *_wrap_Pyramid3_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid3_clone" "', argument " "1"" of type '" "Pyramid3 const *""'"); } arg1 = reinterpret_cast< Pyramid3 * >(argp1); - result = (Pyramid3 *)((Pyramid3 const *)arg1)->clone(); + { + try { + result = (Pyramid3 *)((Pyramid3 const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid3, 0 | 0 ); return resultobj; fail: @@ -47167,7 +54157,17 @@ SWIGINTERN PyObject *_wrap_Pyramid3_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid3_className" "', argument " "1"" of type '" "Pyramid3 const *""'"); } arg1 = reinterpret_cast< Pyramid3 * >(argp1); - result = ((Pyramid3 const *)arg1)->className(); + { + try { + result = ((Pyramid3 const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -47190,7 +54190,17 @@ SWIGINTERN PyObject *_wrap_Pyramid3_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid3_parDefs" "', argument " "1"" of type '" "Pyramid3 const *""'"); } arg1 = reinterpret_cast< Pyramid3 * >(argp1); - result = ((Pyramid3 const *)arg1)->parDefs(); + { + try { + result = ((Pyramid3 const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -47213,7 +54223,17 @@ SWIGINTERN PyObject *_wrap_Pyramid3_baseEdge(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid3_baseEdge" "', argument " "1"" of type '" "Pyramid3 const *""'"); } arg1 = reinterpret_cast< Pyramid3 * >(argp1); - result = (double)((Pyramid3 const *)arg1)->baseEdge(); + { + try { + result = (double)((Pyramid3 const *)arg1)->baseEdge(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47236,7 +54256,17 @@ SWIGINTERN PyObject *_wrap_Pyramid3_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid3_height" "', argument " "1"" of type '" "Pyramid3 const *""'"); } arg1 = reinterpret_cast< Pyramid3 * >(argp1); - result = (double)((Pyramid3 const *)arg1)->height(); + { + try { + result = (double)((Pyramid3 const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47259,7 +54289,17 @@ SWIGINTERN PyObject *_wrap_Pyramid3_alpha(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid3_alpha" "', argument " "1"" of type '" "Pyramid3 const *""'"); } arg1 = reinterpret_cast< Pyramid3 * >(argp1); - result = (double)((Pyramid3 const *)arg1)->alpha(); + { + try { + result = (double)((Pyramid3 const *)arg1)->alpha(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47281,7 +54321,17 @@ SWIGINTERN PyObject *_wrap_delete_Pyramid3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Pyramid3" "', argument " "1"" of type '" "Pyramid3 *""'"); } arg1 = reinterpret_cast< Pyramid3 * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -47329,7 +54379,17 @@ SWIGINTERN PyObject *_wrap_new_Pyramid4__SWIG_0(PyObject *self, Py_ssize_t nobjs SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Pyramid4" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Pyramid4 *)new Pyramid4(arg1,arg2,arg3); + { + try { + result = (Pyramid4 *)new Pyramid4(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid4, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -47352,7 +54412,17 @@ SWIGINTERN PyObject *_wrap_new_Pyramid4__SWIG_1(PyObject *self, Py_ssize_t nobjs arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Pyramid4 *)new Pyramid4(arg1); + { + try { + result = (Pyramid4 *)new Pyramid4(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid4, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -47423,7 +54493,17 @@ SWIGINTERN PyObject *_wrap_Pyramid4_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid4_clone" "', argument " "1"" of type '" "Pyramid4 const *""'"); } arg1 = reinterpret_cast< Pyramid4 * >(argp1); - result = (Pyramid4 *)((Pyramid4 const *)arg1)->clone(); + { + try { + result = (Pyramid4 *)((Pyramid4 const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid4, 0 | 0 ); return resultobj; fail: @@ -47446,7 +54526,17 @@ SWIGINTERN PyObject *_wrap_Pyramid4_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid4_className" "', argument " "1"" of type '" "Pyramid4 const *""'"); } arg1 = reinterpret_cast< Pyramid4 * >(argp1); - result = ((Pyramid4 const *)arg1)->className(); + { + try { + result = ((Pyramid4 const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -47469,7 +54559,17 @@ SWIGINTERN PyObject *_wrap_Pyramid4_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid4_parDefs" "', argument " "1"" of type '" "Pyramid4 const *""'"); } arg1 = reinterpret_cast< Pyramid4 * >(argp1); - result = ((Pyramid4 const *)arg1)->parDefs(); + { + try { + result = ((Pyramid4 const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -47492,7 +54592,17 @@ SWIGINTERN PyObject *_wrap_Pyramid4_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid4_height" "', argument " "1"" of type '" "Pyramid4 const *""'"); } arg1 = reinterpret_cast< Pyramid4 * >(argp1); - result = (double)((Pyramid4 const *)arg1)->height(); + { + try { + result = (double)((Pyramid4 const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47515,7 +54625,17 @@ SWIGINTERN PyObject *_wrap_Pyramid4_baseEdge(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid4_baseEdge" "', argument " "1"" of type '" "Pyramid4 const *""'"); } arg1 = reinterpret_cast< Pyramid4 * >(argp1); - result = (double)((Pyramid4 const *)arg1)->baseEdge(); + { + try { + result = (double)((Pyramid4 const *)arg1)->baseEdge(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47538,7 +54658,17 @@ SWIGINTERN PyObject *_wrap_Pyramid4_alpha(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid4_alpha" "', argument " "1"" of type '" "Pyramid4 const *""'"); } arg1 = reinterpret_cast< Pyramid4 * >(argp1); - result = (double)((Pyramid4 const *)arg1)->alpha(); + { + try { + result = (double)((Pyramid4 const *)arg1)->alpha(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47560,7 +54690,17 @@ SWIGINTERN PyObject *_wrap_delete_Pyramid4(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Pyramid4" "', argument " "1"" of type '" "Pyramid4 *""'"); } arg1 = reinterpret_cast< Pyramid4 * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -47608,7 +54748,17 @@ SWIGINTERN PyObject *_wrap_new_Pyramid6__SWIG_0(PyObject *self, Py_ssize_t nobjs SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Pyramid6" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Pyramid6 *)new Pyramid6(arg1,arg2,arg3); + { + try { + result = (Pyramid6 *)new Pyramid6(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid6, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -47631,7 +54781,17 @@ SWIGINTERN PyObject *_wrap_new_Pyramid6__SWIG_1(PyObject *self, Py_ssize_t nobjs arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Pyramid6 *)new Pyramid6(arg1); + { + try { + result = (Pyramid6 *)new Pyramid6(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid6, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -47702,7 +54862,17 @@ SWIGINTERN PyObject *_wrap_Pyramid6_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid6_clone" "', argument " "1"" of type '" "Pyramid6 const *""'"); } arg1 = reinterpret_cast< Pyramid6 * >(argp1); - result = (Pyramid6 *)((Pyramid6 const *)arg1)->clone(); + { + try { + result = (Pyramid6 *)((Pyramid6 const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pyramid6, 0 | 0 ); return resultobj; fail: @@ -47725,7 +54895,17 @@ SWIGINTERN PyObject *_wrap_Pyramid6_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid6_className" "', argument " "1"" of type '" "Pyramid6 const *""'"); } arg1 = reinterpret_cast< Pyramid6 * >(argp1); - result = ((Pyramid6 const *)arg1)->className(); + { + try { + result = ((Pyramid6 const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -47748,7 +54928,17 @@ SWIGINTERN PyObject *_wrap_Pyramid6_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid6_parDefs" "', argument " "1"" of type '" "Pyramid6 const *""'"); } arg1 = reinterpret_cast< Pyramid6 * >(argp1); - result = ((Pyramid6 const *)arg1)->parDefs(); + { + try { + result = ((Pyramid6 const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -47771,7 +54961,17 @@ SWIGINTERN PyObject *_wrap_Pyramid6_baseEdge(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid6_baseEdge" "', argument " "1"" of type '" "Pyramid6 const *""'"); } arg1 = reinterpret_cast< Pyramid6 * >(argp1); - result = (double)((Pyramid6 const *)arg1)->baseEdge(); + { + try { + result = (double)((Pyramid6 const *)arg1)->baseEdge(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47794,7 +54994,17 @@ SWIGINTERN PyObject *_wrap_Pyramid6_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid6_height" "', argument " "1"" of type '" "Pyramid6 const *""'"); } arg1 = reinterpret_cast< Pyramid6 * >(argp1); - result = (double)((Pyramid6 const *)arg1)->height(); + { + try { + result = (double)((Pyramid6 const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47817,7 +55027,17 @@ SWIGINTERN PyObject *_wrap_Pyramid6_alpha(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Pyramid6_alpha" "', argument " "1"" of type '" "Pyramid6 const *""'"); } arg1 = reinterpret_cast< Pyramid6 * >(argp1); - result = (double)((Pyramid6 const *)arg1)->alpha(); + { + try { + result = (double)((Pyramid6 const *)arg1)->alpha(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -47839,7 +55059,17 @@ SWIGINTERN PyObject *_wrap_delete_Pyramid6(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Pyramid6" "', argument " "1"" of type '" "Pyramid6 *""'"); } arg1 = reinterpret_cast< Pyramid6 * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -47895,7 +55125,17 @@ SWIGINTERN PyObject *_wrap_new_Bipyramid4__SWIG_0(PyObject *self, Py_ssize_t nob SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Bipyramid4" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (Bipyramid4 *)new Bipyramid4(arg1,arg2,arg3,arg4); + { + try { + result = (Bipyramid4 *)new Bipyramid4(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bipyramid4, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -47918,7 +55158,17 @@ SWIGINTERN PyObject *_wrap_new_Bipyramid4__SWIG_1(PyObject *self, Py_ssize_t nob arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Bipyramid4 *)new Bipyramid4(arg1); + { + try { + result = (Bipyramid4 *)new Bipyramid4(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bipyramid4, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -47995,7 +55245,17 @@ SWIGINTERN PyObject *_wrap_Bipyramid4_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bipyramid4_clone" "', argument " "1"" of type '" "Bipyramid4 const *""'"); } arg1 = reinterpret_cast< Bipyramid4 * >(argp1); - result = (Bipyramid4 *)((Bipyramid4 const *)arg1)->clone(); + { + try { + result = (Bipyramid4 *)((Bipyramid4 const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bipyramid4, 0 | 0 ); return resultobj; fail: @@ -48018,7 +55278,17 @@ SWIGINTERN PyObject *_wrap_Bipyramid4_className(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bipyramid4_className" "', argument " "1"" of type '" "Bipyramid4 const *""'"); } arg1 = reinterpret_cast< Bipyramid4 * >(argp1); - result = ((Bipyramid4 const *)arg1)->className(); + { + try { + result = ((Bipyramid4 const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -48041,7 +55311,17 @@ SWIGINTERN PyObject *_wrap_Bipyramid4_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bipyramid4_parDefs" "', argument " "1"" of type '" "Bipyramid4 const *""'"); } arg1 = reinterpret_cast< Bipyramid4 * >(argp1); - result = ((Bipyramid4 const *)arg1)->parDefs(); + { + try { + result = ((Bipyramid4 const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -48064,7 +55344,17 @@ SWIGINTERN PyObject *_wrap_Bipyramid4_length(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bipyramid4_length" "', argument " "1"" of type '" "Bipyramid4 const *""'"); } arg1 = reinterpret_cast< Bipyramid4 * >(argp1); - result = (double)((Bipyramid4 const *)arg1)->length(); + { + try { + result = (double)((Bipyramid4 const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48087,7 +55377,17 @@ SWIGINTERN PyObject *_wrap_Bipyramid4_base_height(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bipyramid4_base_height" "', argument " "1"" of type '" "Bipyramid4 const *""'"); } arg1 = reinterpret_cast< Bipyramid4 * >(argp1); - result = (double)((Bipyramid4 const *)arg1)->base_height(); + { + try { + result = (double)((Bipyramid4 const *)arg1)->base_height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48110,7 +55410,17 @@ SWIGINTERN PyObject *_wrap_Bipyramid4_heightRatio(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bipyramid4_heightRatio" "', argument " "1"" of type '" "Bipyramid4 const *""'"); } arg1 = reinterpret_cast< Bipyramid4 * >(argp1); - result = (double)((Bipyramid4 const *)arg1)->heightRatio(); + { + try { + result = (double)((Bipyramid4 const *)arg1)->heightRatio(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48133,7 +55443,17 @@ SWIGINTERN PyObject *_wrap_Bipyramid4_alpha(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bipyramid4_alpha" "', argument " "1"" of type '" "Bipyramid4 const *""'"); } arg1 = reinterpret_cast< Bipyramid4 * >(argp1); - result = (double)((Bipyramid4 const *)arg1)->alpha(); + { + try { + result = (double)((Bipyramid4 const *)arg1)->alpha(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48156,7 +55476,17 @@ SWIGINTERN PyObject *_wrap_Bipyramid4_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bipyramid4_height" "', argument " "1"" of type '" "Bipyramid4 const *""'"); } arg1 = reinterpret_cast< Bipyramid4 * >(argp1); - result = (double)((Bipyramid4 const *)arg1)->height(); + { + try { + result = (double)((Bipyramid4 const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48178,7 +55508,17 @@ SWIGINTERN PyObject *_wrap_delete_Bipyramid4(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bipyramid4" "', argument " "1"" of type '" "Bipyramid4 *""'"); } arg1 = reinterpret_cast< Bipyramid4 * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -48218,7 +55558,17 @@ SWIGINTERN PyObject *_wrap_new_CantellatedCube__SWIG_0(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CantellatedCube" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (CantellatedCube *)new CantellatedCube(arg1,arg2); + { + try { + result = (CantellatedCube *)new CantellatedCube(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CantellatedCube, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -48241,7 +55591,17 @@ SWIGINTERN PyObject *_wrap_new_CantellatedCube__SWIG_1(PyObject *self, Py_ssize_ arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (CantellatedCube *)new CantellatedCube(arg1); + { + try { + result = (CantellatedCube *)new CantellatedCube(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CantellatedCube, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -48306,7 +55666,17 @@ SWIGINTERN PyObject *_wrap_CantellatedCube_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CantellatedCube_clone" "', argument " "1"" of type '" "CantellatedCube const *""'"); } arg1 = reinterpret_cast< CantellatedCube * >(argp1); - result = (CantellatedCube *)((CantellatedCube const *)arg1)->clone(); + { + try { + result = (CantellatedCube *)((CantellatedCube const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CantellatedCube, 0 | 0 ); return resultobj; fail: @@ -48329,7 +55699,17 @@ SWIGINTERN PyObject *_wrap_CantellatedCube_className(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CantellatedCube_className" "', argument " "1"" of type '" "CantellatedCube const *""'"); } arg1 = reinterpret_cast< CantellatedCube * >(argp1); - result = ((CantellatedCube const *)arg1)->className(); + { + try { + result = ((CantellatedCube const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -48352,7 +55732,17 @@ SWIGINTERN PyObject *_wrap_CantellatedCube_parDefs(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CantellatedCube_parDefs" "', argument " "1"" of type '" "CantellatedCube const *""'"); } arg1 = reinterpret_cast< CantellatedCube * >(argp1); - result = ((CantellatedCube const *)arg1)->parDefs(); + { + try { + result = ((CantellatedCube const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -48375,7 +55765,17 @@ SWIGINTERN PyObject *_wrap_CantellatedCube_length(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CantellatedCube_length" "', argument " "1"" of type '" "CantellatedCube const *""'"); } arg1 = reinterpret_cast< CantellatedCube * >(argp1); - result = (double)((CantellatedCube const *)arg1)->length(); + { + try { + result = (double)((CantellatedCube const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48398,7 +55798,17 @@ SWIGINTERN PyObject *_wrap_CantellatedCube_removedLength(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CantellatedCube_removedLength" "', argument " "1"" of type '" "CantellatedCube const *""'"); } arg1 = reinterpret_cast< CantellatedCube * >(argp1); - result = (double)((CantellatedCube const *)arg1)->removedLength(); + { + try { + result = (double)((CantellatedCube const *)arg1)->removedLength(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48420,7 +55830,17 @@ SWIGINTERN PyObject *_wrap_delete_CantellatedCube(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CantellatedCube" "', argument " "1"" of type '" "CantellatedCube *""'"); } arg1 = reinterpret_cast< CantellatedCube * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -48460,7 +55880,17 @@ SWIGINTERN PyObject *_wrap_new_TruncatedCube__SWIG_0(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TruncatedCube" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (TruncatedCube *)new TruncatedCube(arg1,arg2); + { + try { + result = (TruncatedCube *)new TruncatedCube(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TruncatedCube, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -48483,7 +55913,17 @@ SWIGINTERN PyObject *_wrap_new_TruncatedCube__SWIG_1(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (TruncatedCube *)new TruncatedCube(arg1); + { + try { + result = (TruncatedCube *)new TruncatedCube(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TruncatedCube, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -48548,7 +55988,17 @@ SWIGINTERN PyObject *_wrap_TruncatedCube_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedCube_clone" "', argument " "1"" of type '" "TruncatedCube const *""'"); } arg1 = reinterpret_cast< TruncatedCube * >(argp1); - result = (TruncatedCube *)((TruncatedCube const *)arg1)->clone(); + { + try { + result = (TruncatedCube *)((TruncatedCube const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TruncatedCube, 0 | 0 ); return resultobj; fail: @@ -48571,7 +56021,17 @@ SWIGINTERN PyObject *_wrap_TruncatedCube_className(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedCube_className" "', argument " "1"" of type '" "TruncatedCube const *""'"); } arg1 = reinterpret_cast< TruncatedCube * >(argp1); - result = ((TruncatedCube const *)arg1)->className(); + { + try { + result = ((TruncatedCube const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -48594,7 +56054,17 @@ SWIGINTERN PyObject *_wrap_TruncatedCube_parDefs(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedCube_parDefs" "', argument " "1"" of type '" "TruncatedCube const *""'"); } arg1 = reinterpret_cast< TruncatedCube * >(argp1); - result = ((TruncatedCube const *)arg1)->parDefs(); + { + try { + result = ((TruncatedCube const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -48617,7 +56087,17 @@ SWIGINTERN PyObject *_wrap_TruncatedCube_length(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedCube_length" "', argument " "1"" of type '" "TruncatedCube const *""'"); } arg1 = reinterpret_cast< TruncatedCube * >(argp1); - result = (double)((TruncatedCube const *)arg1)->length(); + { + try { + result = (double)((TruncatedCube const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48640,7 +56120,17 @@ SWIGINTERN PyObject *_wrap_TruncatedCube_removedLength(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedCube_removedLength" "', argument " "1"" of type '" "TruncatedCube const *""'"); } arg1 = reinterpret_cast< TruncatedCube * >(argp1); - result = (double)((TruncatedCube const *)arg1)->removedLength(); + { + try { + result = (double)((TruncatedCube const *)arg1)->removedLength(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48662,7 +56152,17 @@ SWIGINTERN PyObject *_wrap_delete_TruncatedCube(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TruncatedCube" "', argument " "1"" of type '" "TruncatedCube *""'"); } arg1 = reinterpret_cast< TruncatedCube * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -48710,7 +56210,17 @@ SWIGINTERN PyObject *_wrap_new_Cone__SWIG_0(PyObject *self, Py_ssize_t nobjs, Py SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Cone" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Cone *)new Cone(arg1,arg2,arg3); + { + try { + result = (Cone *)new Cone(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cone, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -48733,7 +56243,17 @@ SWIGINTERN PyObject *_wrap_new_Cone__SWIG_1(PyObject *self, Py_ssize_t nobjs, Py arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Cone *)new Cone(arg1); + { + try { + result = (Cone *)new Cone(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cone, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -48804,7 +56324,17 @@ SWIGINTERN PyObject *_wrap_Cone_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cone_clone" "', argument " "1"" of type '" "Cone const *""'"); } arg1 = reinterpret_cast< Cone * >(argp1); - result = (Cone *)((Cone const *)arg1)->clone(); + { + try { + result = (Cone *)((Cone const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cone, 0 | 0 ); return resultobj; fail: @@ -48827,7 +56357,17 @@ SWIGINTERN PyObject *_wrap_Cone_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cone_className" "', argument " "1"" of type '" "Cone const *""'"); } arg1 = reinterpret_cast< Cone * >(argp1); - result = ((Cone const *)arg1)->className(); + { + try { + result = ((Cone const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -48850,7 +56390,17 @@ SWIGINTERN PyObject *_wrap_Cone_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cone_parDefs" "', argument " "1"" of type '" "Cone const *""'"); } arg1 = reinterpret_cast< Cone * >(argp1); - result = ((Cone const *)arg1)->parDefs(); + { + try { + result = ((Cone const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -48873,7 +56423,17 @@ SWIGINTERN PyObject *_wrap_Cone_radius(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cone_radius" "', argument " "1"" of type '" "Cone const *""'"); } arg1 = reinterpret_cast< Cone * >(argp1); - result = (double)((Cone const *)arg1)->radius(); + { + try { + result = (double)((Cone const *)arg1)->radius(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48896,7 +56456,17 @@ SWIGINTERN PyObject *_wrap_Cone_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cone_height" "', argument " "1"" of type '" "Cone const *""'"); } arg1 = reinterpret_cast< Cone * >(argp1); - result = (double)((Cone const *)arg1)->height(); + { + try { + result = (double)((Cone const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48919,7 +56489,17 @@ SWIGINTERN PyObject *_wrap_Cone_alpha(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cone_alpha" "', argument " "1"" of type '" "Cone const *""'"); } arg1 = reinterpret_cast< Cone * >(argp1); - result = (double)((Cone const *)arg1)->alpha(); + { + try { + result = (double)((Cone const *)arg1)->alpha(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48942,7 +56522,17 @@ SWIGINTERN PyObject *_wrap_Cone_radialExtension(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cone_radialExtension" "', argument " "1"" of type '" "Cone const *""'"); } arg1 = reinterpret_cast< Cone * >(argp1); - result = (double)((Cone const *)arg1)->radialExtension(); + { + try { + result = (double)((Cone const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -48980,7 +56570,17 @@ SWIGINTERN PyObject *_wrap_Cone_formfactor(PyObject *self, PyObject *args) { if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((Cone const *)arg1)->formfactor(arg2); + { + try { + result = ((Cone const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -49003,7 +56603,17 @@ SWIGINTERN PyObject *_wrap_Cone_validate(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cone_validate" "', argument " "1"" of type '" "Cone const *""'"); } arg1 = reinterpret_cast< Cone * >(argp1); - result = ((Cone const *)arg1)->validate(); + { + try { + result = ((Cone const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -49025,7 +56635,17 @@ SWIGINTERN PyObject *_wrap_delete_Cone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cone" "', argument " "1"" of type '" "Cone *""'"); } arg1 = reinterpret_cast< Cone * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -49065,7 +56685,17 @@ SWIGINTERN PyObject *_wrap_new_Cylinder__SWIG_0(PyObject *self, Py_ssize_t nobjs SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Cylinder" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Cylinder *)new Cylinder(arg1,arg2); + { + try { + result = (Cylinder *)new Cylinder(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cylinder, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -49088,7 +56718,17 @@ SWIGINTERN PyObject *_wrap_new_Cylinder__SWIG_1(PyObject *self, Py_ssize_t nobjs arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Cylinder *)new Cylinder(arg1); + { + try { + result = (Cylinder *)new Cylinder(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cylinder, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -49153,7 +56793,17 @@ SWIGINTERN PyObject *_wrap_Cylinder_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cylinder_clone" "', argument " "1"" of type '" "Cylinder const *""'"); } arg1 = reinterpret_cast< Cylinder * >(argp1); - result = (Cylinder *)((Cylinder const *)arg1)->clone(); + { + try { + result = (Cylinder *)((Cylinder const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cylinder, 0 | 0 ); return resultobj; fail: @@ -49176,7 +56826,17 @@ SWIGINTERN PyObject *_wrap_Cylinder_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cylinder_className" "', argument " "1"" of type '" "Cylinder const *""'"); } arg1 = reinterpret_cast< Cylinder * >(argp1); - result = ((Cylinder const *)arg1)->className(); + { + try { + result = ((Cylinder const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -49199,7 +56859,17 @@ SWIGINTERN PyObject *_wrap_Cylinder_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cylinder_parDefs" "', argument " "1"" of type '" "Cylinder const *""'"); } arg1 = reinterpret_cast< Cylinder * >(argp1); - result = ((Cylinder const *)arg1)->parDefs(); + { + try { + result = ((Cylinder const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -49222,7 +56892,17 @@ SWIGINTERN PyObject *_wrap_Cylinder_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cylinder_height" "', argument " "1"" of type '" "Cylinder const *""'"); } arg1 = reinterpret_cast< Cylinder * >(argp1); - result = (double)((Cylinder const *)arg1)->height(); + { + try { + result = (double)((Cylinder const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -49245,7 +56925,17 @@ SWIGINTERN PyObject *_wrap_Cylinder_radius(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cylinder_radius" "', argument " "1"" of type '" "Cylinder const *""'"); } arg1 = reinterpret_cast< Cylinder * >(argp1); - result = (double)((Cylinder const *)arg1)->radius(); + { + try { + result = (double)((Cylinder const *)arg1)->radius(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -49268,7 +56958,17 @@ SWIGINTERN PyObject *_wrap_Cylinder_radialExtension(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cylinder_radialExtension" "', argument " "1"" of type '" "Cylinder const *""'"); } arg1 = reinterpret_cast< Cylinder * >(argp1); - result = (double)((Cylinder const *)arg1)->radialExtension(); + { + try { + result = (double)((Cylinder const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -49306,7 +57006,17 @@ SWIGINTERN PyObject *_wrap_Cylinder_formfactor(PyObject *self, PyObject *args) { if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((Cylinder const *)arg1)->formfactor(arg2); + { + try { + result = ((Cylinder const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -49329,7 +57039,17 @@ SWIGINTERN PyObject *_wrap_Cylinder_validate(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cylinder_validate" "', argument " "1"" of type '" "Cylinder const *""'"); } arg1 = reinterpret_cast< Cylinder * >(argp1); - result = ((Cylinder const *)arg1)->validate(); + { + try { + result = ((Cylinder const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -49351,7 +57071,17 @@ SWIGINTERN PyObject *_wrap_delete_Cylinder(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cylinder" "', argument " "1"" of type '" "Cylinder *""'"); } arg1 = reinterpret_cast< Cylinder * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -49399,7 +57129,17 @@ SWIGINTERN PyObject *_wrap_new_EllipsoidalCylinder__SWIG_0(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_EllipsoidalCylinder" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (EllipsoidalCylinder *)new EllipsoidalCylinder(arg1,arg2,arg3); + { + try { + result = (EllipsoidalCylinder *)new EllipsoidalCylinder(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EllipsoidalCylinder, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -49422,7 +57162,17 @@ SWIGINTERN PyObject *_wrap_new_EllipsoidalCylinder__SWIG_1(PyObject *self, Py_ss arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (EllipsoidalCylinder *)new EllipsoidalCylinder(arg1); + { + try { + result = (EllipsoidalCylinder *)new EllipsoidalCylinder(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EllipsoidalCylinder, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -49493,7 +57243,17 @@ SWIGINTERN PyObject *_wrap_EllipsoidalCylinder_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EllipsoidalCylinder_clone" "', argument " "1"" of type '" "EllipsoidalCylinder const *""'"); } arg1 = reinterpret_cast< EllipsoidalCylinder * >(argp1); - result = (EllipsoidalCylinder *)((EllipsoidalCylinder const *)arg1)->clone(); + { + try { + result = (EllipsoidalCylinder *)((EllipsoidalCylinder const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EllipsoidalCylinder, 0 | 0 ); return resultobj; fail: @@ -49516,7 +57276,17 @@ SWIGINTERN PyObject *_wrap_EllipsoidalCylinder_className(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EllipsoidalCylinder_className" "', argument " "1"" of type '" "EllipsoidalCylinder const *""'"); } arg1 = reinterpret_cast< EllipsoidalCylinder * >(argp1); - result = ((EllipsoidalCylinder const *)arg1)->className(); + { + try { + result = ((EllipsoidalCylinder const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -49539,7 +57309,17 @@ SWIGINTERN PyObject *_wrap_EllipsoidalCylinder_parDefs(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EllipsoidalCylinder_parDefs" "', argument " "1"" of type '" "EllipsoidalCylinder const *""'"); } arg1 = reinterpret_cast< EllipsoidalCylinder * >(argp1); - result = ((EllipsoidalCylinder const *)arg1)->parDefs(); + { + try { + result = ((EllipsoidalCylinder const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -49562,7 +57342,17 @@ SWIGINTERN PyObject *_wrap_EllipsoidalCylinder_radiusX(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EllipsoidalCylinder_radiusX" "', argument " "1"" of type '" "EllipsoidalCylinder const *""'"); } arg1 = reinterpret_cast< EllipsoidalCylinder * >(argp1); - result = (double)((EllipsoidalCylinder const *)arg1)->radiusX(); + { + try { + result = (double)((EllipsoidalCylinder const *)arg1)->radiusX(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -49585,7 +57375,17 @@ SWIGINTERN PyObject *_wrap_EllipsoidalCylinder_radiusY(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EllipsoidalCylinder_radiusY" "', argument " "1"" of type '" "EllipsoidalCylinder const *""'"); } arg1 = reinterpret_cast< EllipsoidalCylinder * >(argp1); - result = (double)((EllipsoidalCylinder const *)arg1)->radiusY(); + { + try { + result = (double)((EllipsoidalCylinder const *)arg1)->radiusY(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -49608,7 +57408,17 @@ SWIGINTERN PyObject *_wrap_EllipsoidalCylinder_height(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EllipsoidalCylinder_height" "', argument " "1"" of type '" "EllipsoidalCylinder const *""'"); } arg1 = reinterpret_cast< EllipsoidalCylinder * >(argp1); - result = (double)((EllipsoidalCylinder const *)arg1)->height(); + { + try { + result = (double)((EllipsoidalCylinder const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -49631,7 +57441,17 @@ SWIGINTERN PyObject *_wrap_EllipsoidalCylinder_radialExtension(PyObject *self, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EllipsoidalCylinder_radialExtension" "', argument " "1"" of type '" "EllipsoidalCylinder const *""'"); } arg1 = reinterpret_cast< EllipsoidalCylinder * >(argp1); - result = (double)((EllipsoidalCylinder const *)arg1)->radialExtension(); + { + try { + result = (double)((EllipsoidalCylinder const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -49669,7 +57489,17 @@ SWIGINTERN PyObject *_wrap_EllipsoidalCylinder_formfactor(PyObject *self, PyObje if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((EllipsoidalCylinder const *)arg1)->formfactor(arg2); + { + try { + result = ((EllipsoidalCylinder const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -49692,7 +57522,17 @@ SWIGINTERN PyObject *_wrap_EllipsoidalCylinder_validate(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EllipsoidalCylinder_validate" "', argument " "1"" of type '" "EllipsoidalCylinder const *""'"); } arg1 = reinterpret_cast< EllipsoidalCylinder * >(argp1); - result = ((EllipsoidalCylinder const *)arg1)->validate(); + { + try { + result = ((EllipsoidalCylinder const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -49714,7 +57554,17 @@ SWIGINTERN PyObject *_wrap_delete_EllipsoidalCylinder(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EllipsoidalCylinder" "', argument " "1"" of type '" "EllipsoidalCylinder *""'"); } arg1 = reinterpret_cast< EllipsoidalCylinder * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -49762,7 +57612,17 @@ SWIGINTERN PyObject *_wrap_new_HemiEllipsoid__SWIG_0(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HemiEllipsoid" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (HemiEllipsoid *)new HemiEllipsoid(arg1,arg2,arg3); + { + try { + result = (HemiEllipsoid *)new HemiEllipsoid(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HemiEllipsoid, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -49785,7 +57645,17 @@ SWIGINTERN PyObject *_wrap_new_HemiEllipsoid__SWIG_1(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (HemiEllipsoid *)new HemiEllipsoid(arg1); + { + try { + result = (HemiEllipsoid *)new HemiEllipsoid(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HemiEllipsoid, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -49855,7 +57725,17 @@ SWIGINTERN PyObject *_wrap_delete_HemiEllipsoid(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HemiEllipsoid" "', argument " "1"" of type '" "HemiEllipsoid *""'"); } arg1 = reinterpret_cast< HemiEllipsoid * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -49878,7 +57758,17 @@ SWIGINTERN PyObject *_wrap_HemiEllipsoid_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HemiEllipsoid_clone" "', argument " "1"" of type '" "HemiEllipsoid const *""'"); } arg1 = reinterpret_cast< HemiEllipsoid * >(argp1); - result = (HemiEllipsoid *)((HemiEllipsoid const *)arg1)->clone(); + { + try { + result = (HemiEllipsoid *)((HemiEllipsoid const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HemiEllipsoid, 0 | 0 ); return resultobj; fail: @@ -49901,7 +57791,17 @@ SWIGINTERN PyObject *_wrap_HemiEllipsoid_className(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HemiEllipsoid_className" "', argument " "1"" of type '" "HemiEllipsoid const *""'"); } arg1 = reinterpret_cast< HemiEllipsoid * >(argp1); - result = ((HemiEllipsoid const *)arg1)->className(); + { + try { + result = ((HemiEllipsoid const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -49924,7 +57824,17 @@ SWIGINTERN PyObject *_wrap_HemiEllipsoid_parDefs(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HemiEllipsoid_parDefs" "', argument " "1"" of type '" "HemiEllipsoid const *""'"); } arg1 = reinterpret_cast< HemiEllipsoid * >(argp1); - result = ((HemiEllipsoid const *)arg1)->parDefs(); + { + try { + result = ((HemiEllipsoid const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -49947,7 +57857,17 @@ SWIGINTERN PyObject *_wrap_HemiEllipsoid_height(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HemiEllipsoid_height" "', argument " "1"" of type '" "HemiEllipsoid const *""'"); } arg1 = reinterpret_cast< HemiEllipsoid * >(argp1); - result = (double)((HemiEllipsoid const *)arg1)->height(); + { + try { + result = (double)((HemiEllipsoid const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -49970,7 +57890,17 @@ SWIGINTERN PyObject *_wrap_HemiEllipsoid_radiusX(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HemiEllipsoid_radiusX" "', argument " "1"" of type '" "HemiEllipsoid const *""'"); } arg1 = reinterpret_cast< HemiEllipsoid * >(argp1); - result = (double)((HemiEllipsoid const *)arg1)->radiusX(); + { + try { + result = (double)((HemiEllipsoid const *)arg1)->radiusX(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -49993,7 +57923,17 @@ SWIGINTERN PyObject *_wrap_HemiEllipsoid_radiusY(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HemiEllipsoid_radiusY" "', argument " "1"" of type '" "HemiEllipsoid const *""'"); } arg1 = reinterpret_cast< HemiEllipsoid * >(argp1); - result = (double)((HemiEllipsoid const *)arg1)->radiusY(); + { + try { + result = (double)((HemiEllipsoid const *)arg1)->radiusY(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50016,7 +57956,17 @@ SWIGINTERN PyObject *_wrap_HemiEllipsoid_radialExtension(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HemiEllipsoid_radialExtension" "', argument " "1"" of type '" "HemiEllipsoid const *""'"); } arg1 = reinterpret_cast< HemiEllipsoid * >(argp1); - result = (double)((HemiEllipsoid const *)arg1)->radialExtension(); + { + try { + result = (double)((HemiEllipsoid const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50054,7 +58004,17 @@ SWIGINTERN PyObject *_wrap_HemiEllipsoid_formfactor(PyObject *self, PyObject *ar if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((HemiEllipsoid const *)arg1)->formfactor(arg2); + { + try { + result = ((HemiEllipsoid const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -50077,7 +58037,17 @@ SWIGINTERN PyObject *_wrap_HemiEllipsoid_validate(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HemiEllipsoid_validate" "', argument " "1"" of type '" "HemiEllipsoid const *""'"); } arg1 = reinterpret_cast< HemiEllipsoid * >(argp1); - result = ((HemiEllipsoid const *)arg1)->validate(); + { + try { + result = ((HemiEllipsoid const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -50133,7 +58103,17 @@ SWIGINTERN PyObject *_wrap_new_HorizontalCylinder__SWIG_0(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_HorizontalCylinder" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (HorizontalCylinder *)new HorizontalCylinder(arg1,arg2,arg3,arg4); + { + try { + result = (HorizontalCylinder *)new HorizontalCylinder(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HorizontalCylinder, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -50162,7 +58142,17 @@ SWIGINTERN PyObject *_wrap_new_HorizontalCylinder__SWIG_1(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HorizontalCylinder" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (HorizontalCylinder *)new HorizontalCylinder(arg1,arg2); + { + try { + result = (HorizontalCylinder *)new HorizontalCylinder(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HorizontalCylinder, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -50185,7 +58175,17 @@ SWIGINTERN PyObject *_wrap_new_HorizontalCylinder__SWIG_2(PyObject *self, Py_ssi arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (HorizontalCylinder *)new HorizontalCylinder(arg1); + { + try { + result = (HorizontalCylinder *)new HorizontalCylinder(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HorizontalCylinder, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -50279,7 +58279,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_clone(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_clone" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = (HorizontalCylinder *)((HorizontalCylinder const *)arg1)->clone(); + { + try { + result = (HorizontalCylinder *)((HorizontalCylinder const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HorizontalCylinder, 0 | 0 ); return resultobj; fail: @@ -50302,7 +58312,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_className" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = ((HorizontalCylinder const *)arg1)->className(); + { + try { + result = ((HorizontalCylinder const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -50325,7 +58345,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_parDefs(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_parDefs" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = ((HorizontalCylinder const *)arg1)->parDefs(); + { + try { + result = ((HorizontalCylinder const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -50348,7 +58378,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_length(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_length" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = (double)((HorizontalCylinder const *)arg1)->length(); + { + try { + result = (double)((HorizontalCylinder const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50371,7 +58411,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_radius(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_radius" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = (double)((HorizontalCylinder const *)arg1)->radius(); + { + try { + result = (double)((HorizontalCylinder const *)arg1)->radius(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50394,7 +58444,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_slice_bottom(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_slice_bottom" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = (double)((HorizontalCylinder const *)arg1)->slice_bottom(); + { + try { + result = (double)((HorizontalCylinder const *)arg1)->slice_bottom(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50417,7 +58477,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_slice_top(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_slice_top" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = (double)((HorizontalCylinder const *)arg1)->slice_top(); + { + try { + result = (double)((HorizontalCylinder const *)arg1)->slice_top(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50440,7 +58510,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_height(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_height" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = (double)((HorizontalCylinder const *)arg1)->height(); + { + try { + result = (double)((HorizontalCylinder const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50463,7 +58543,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_radialExtension(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_radialExtension" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = (double)((HorizontalCylinder const *)arg1)->radialExtension(); + { + try { + result = (double)((HorizontalCylinder const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50501,7 +58591,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_formfactor(PyObject *self, PyObjec if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((HorizontalCylinder const *)arg1)->formfactor(arg2); + { + try { + result = ((HorizontalCylinder const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -50524,7 +58624,17 @@ SWIGINTERN PyObject *_wrap_HorizontalCylinder_validate(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HorizontalCylinder_validate" "', argument " "1"" of type '" "HorizontalCylinder const *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - result = ((HorizontalCylinder const *)arg1)->validate(); + { + try { + result = ((HorizontalCylinder const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -50546,7 +58656,17 @@ SWIGINTERN PyObject *_wrap_delete_HorizontalCylinder(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HorizontalCylinder" "', argument " "1"" of type '" "HorizontalCylinder *""'"); } arg1 = reinterpret_cast< HorizontalCylinder * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -50586,7 +58706,17 @@ SWIGINTERN PyObject *_wrap_new_Sphere__SWIG_0(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Sphere" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - result = (Sphere *)new Sphere(arg1,arg2); + { + try { + result = (Sphere *)new Sphere(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Sphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -50607,7 +58737,17 @@ SWIGINTERN PyObject *_wrap_new_Sphere__SWIG_1(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Sphere" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (Sphere *)new Sphere(arg1); + { + try { + result = (Sphere *)new Sphere(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Sphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -50638,7 +58778,17 @@ SWIGINTERN PyObject *_wrap_new_Sphere__SWIG_2(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Sphere" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - result = (Sphere *)new Sphere(arg1,arg2); + { + try { + result = (Sphere *)new Sphere(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Sphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -50661,7 +58811,17 @@ SWIGINTERN PyObject *_wrap_new_Sphere__SWIG_3(PyObject *self, Py_ssize_t nobjs, arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Sphere *)new Sphere(arg1); + { + try { + result = (Sphere *)new Sphere(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Sphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -50752,7 +58912,17 @@ SWIGINTERN PyObject *_wrap_Sphere_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sphere_clone" "', argument " "1"" of type '" "Sphere const *""'"); } arg1 = reinterpret_cast< Sphere * >(argp1); - result = (Sphere *)((Sphere const *)arg1)->clone(); + { + try { + result = (Sphere *)((Sphere const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Sphere, 0 | 0 ); return resultobj; fail: @@ -50775,7 +58945,17 @@ SWIGINTERN PyObject *_wrap_Sphere_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sphere_className" "', argument " "1"" of type '" "Sphere const *""'"); } arg1 = reinterpret_cast< Sphere * >(argp1); - result = ((Sphere const *)arg1)->className(); + { + try { + result = ((Sphere const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -50798,7 +58978,17 @@ SWIGINTERN PyObject *_wrap_Sphere_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sphere_parDefs" "', argument " "1"" of type '" "Sphere const *""'"); } arg1 = reinterpret_cast< Sphere * >(argp1); - result = ((Sphere const *)arg1)->parDefs(); + { + try { + result = ((Sphere const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -50821,7 +59011,17 @@ SWIGINTERN PyObject *_wrap_Sphere_radius(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sphere_radius" "', argument " "1"" of type '" "Sphere const *""'"); } arg1 = reinterpret_cast< Sphere * >(argp1); - result = (double)((Sphere const *)arg1)->radius(); + { + try { + result = (double)((Sphere const *)arg1)->radius(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50844,7 +59044,17 @@ SWIGINTERN PyObject *_wrap_Sphere_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sphere_height" "', argument " "1"" of type '" "Sphere const *""'"); } arg1 = reinterpret_cast< Sphere * >(argp1); - result = (double)((Sphere const *)arg1)->height(); + { + try { + result = (double)((Sphere const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50867,7 +59077,17 @@ SWIGINTERN PyObject *_wrap_Sphere_radialExtension(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sphere_radialExtension" "', argument " "1"" of type '" "Sphere const *""'"); } arg1 = reinterpret_cast< Sphere * >(argp1); - result = (double)((Sphere const *)arg1)->radialExtension(); + { + try { + result = (double)((Sphere const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50905,7 +59125,17 @@ SWIGINTERN PyObject *_wrap_Sphere_formfactor(PyObject *self, PyObject *args) { if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((Sphere const *)arg1)->formfactor(arg2); + { + try { + result = ((Sphere const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -50935,7 +59165,17 @@ SWIGINTERN PyObject *_wrap_Sphere_spanZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Sphere_spanZ" "', argument " "2"" of type '" "IRotation const *""'"); } arg2 = reinterpret_cast< IRotation * >(argp2); - result = ((Sphere const *)arg1)->spanZ((IRotation const *)arg2); + { + try { + result = ((Sphere const *)arg1)->spanZ((IRotation const *)arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Span(result)), SWIGTYPE_p_Span, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -50958,7 +59198,17 @@ SWIGINTERN PyObject *_wrap_Sphere_validate(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sphere_validate" "', argument " "1"" of type '" "Sphere const *""'"); } arg1 = reinterpret_cast< Sphere * >(argp1); - result = ((Sphere const *)arg1)->validate(); + { + try { + result = ((Sphere const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -50980,7 +59230,17 @@ SWIGINTERN PyObject *_wrap_delete_Sphere(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Sphere" "', argument " "1"" of type '" "Sphere *""'"); } arg1 = reinterpret_cast< Sphere * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -51020,7 +59280,17 @@ SWIGINTERN PyObject *_wrap_new_Spheroid__SWIG_0(PyObject *self, Py_ssize_t nobjs SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Spheroid" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (Spheroid *)new Spheroid(arg1,arg2); + { + try { + result = (Spheroid *)new Spheroid(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Spheroid, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -51043,7 +59313,17 @@ SWIGINTERN PyObject *_wrap_new_Spheroid__SWIG_1(PyObject *self, Py_ssize_t nobjs arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (Spheroid *)new Spheroid(arg1); + { + try { + result = (Spheroid *)new Spheroid(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Spheroid, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -51108,7 +59388,17 @@ SWIGINTERN PyObject *_wrap_Spheroid_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Spheroid_clone" "', argument " "1"" of type '" "Spheroid const *""'"); } arg1 = reinterpret_cast< Spheroid * >(argp1); - result = (Spheroid *)((Spheroid const *)arg1)->clone(); + { + try { + result = (Spheroid *)((Spheroid const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Spheroid, 0 | 0 ); return resultobj; fail: @@ -51131,7 +59421,17 @@ SWIGINTERN PyObject *_wrap_Spheroid_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Spheroid_className" "', argument " "1"" of type '" "Spheroid const *""'"); } arg1 = reinterpret_cast< Spheroid * >(argp1); - result = ((Spheroid const *)arg1)->className(); + { + try { + result = ((Spheroid const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -51154,7 +59454,17 @@ SWIGINTERN PyObject *_wrap_Spheroid_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Spheroid_parDefs" "', argument " "1"" of type '" "Spheroid const *""'"); } arg1 = reinterpret_cast< Spheroid * >(argp1); - result = ((Spheroid const *)arg1)->parDefs(); + { + try { + result = ((Spheroid const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -51177,7 +59487,17 @@ SWIGINTERN PyObject *_wrap_Spheroid_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Spheroid_height" "', argument " "1"" of type '" "Spheroid const *""'"); } arg1 = reinterpret_cast< Spheroid * >(argp1); - result = (double)((Spheroid const *)arg1)->height(); + { + try { + result = (double)((Spheroid const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51200,7 +59520,17 @@ SWIGINTERN PyObject *_wrap_Spheroid_radius(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Spheroid_radius" "', argument " "1"" of type '" "Spheroid const *""'"); } arg1 = reinterpret_cast< Spheroid * >(argp1); - result = (double)((Spheroid const *)arg1)->radius(); + { + try { + result = (double)((Spheroid const *)arg1)->radius(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51223,7 +59553,17 @@ SWIGINTERN PyObject *_wrap_Spheroid_radialExtension(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Spheroid_radialExtension" "', argument " "1"" of type '" "Spheroid const *""'"); } arg1 = reinterpret_cast< Spheroid * >(argp1); - result = (double)((Spheroid const *)arg1)->radialExtension(); + { + try { + result = (double)((Spheroid const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51261,7 +59601,17 @@ SWIGINTERN PyObject *_wrap_Spheroid_formfactor(PyObject *self, PyObject *args) { if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((Spheroid const *)arg1)->formfactor(arg2); + { + try { + result = ((Spheroid const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -51284,7 +59634,17 @@ SWIGINTERN PyObject *_wrap_Spheroid_validate(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Spheroid_validate" "', argument " "1"" of type '" "Spheroid const *""'"); } arg1 = reinterpret_cast< Spheroid * >(argp1); - result = ((Spheroid const *)arg1)->validate(); + { + try { + result = ((Spheroid const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -51306,7 +59666,17 @@ SWIGINTERN PyObject *_wrap_delete_Spheroid(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Spheroid" "', argument " "1"" of type '" "Spheroid *""'"); } arg1 = reinterpret_cast< Spheroid * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -51354,7 +59724,17 @@ SWIGINTERN PyObject *_wrap_new_TruncatedSphere__SWIG_0(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TruncatedSphere" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (TruncatedSphere *)new TruncatedSphere(arg1,arg2,arg3); + { + try { + result = (TruncatedSphere *)new TruncatedSphere(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TruncatedSphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -51377,7 +59757,17 @@ SWIGINTERN PyObject *_wrap_new_TruncatedSphere__SWIG_1(PyObject *self, Py_ssize_ arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (TruncatedSphere *)new TruncatedSphere(arg1); + { + try { + result = (TruncatedSphere *)new TruncatedSphere(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TruncatedSphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -51448,7 +59838,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSphere_clone" "', argument " "1"" of type '" "TruncatedSphere const *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - result = (TruncatedSphere *)((TruncatedSphere const *)arg1)->clone(); + { + try { + result = (TruncatedSphere *)((TruncatedSphere const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TruncatedSphere, 0 | 0 ); return resultobj; fail: @@ -51471,7 +59871,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_className(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSphere_className" "', argument " "1"" of type '" "TruncatedSphere const *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - result = ((TruncatedSphere const *)arg1)->className(); + { + try { + result = ((TruncatedSphere const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -51494,7 +59904,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_parDefs(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSphere_parDefs" "', argument " "1"" of type '" "TruncatedSphere const *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - result = ((TruncatedSphere const *)arg1)->parDefs(); + { + try { + result = ((TruncatedSphere const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -51517,7 +59937,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_untruncated_height(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSphere_untruncated_height" "', argument " "1"" of type '" "TruncatedSphere const *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - result = (double)((TruncatedSphere const *)arg1)->untruncated_height(); + { + try { + result = (double)((TruncatedSphere const *)arg1)->untruncated_height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51540,7 +59970,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_radius(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSphere_radius" "', argument " "1"" of type '" "TruncatedSphere const *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - result = (double)((TruncatedSphere const *)arg1)->radius(); + { + try { + result = (double)((TruncatedSphere const *)arg1)->radius(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51563,7 +60003,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_removedTop(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSphere_removedTop" "', argument " "1"" of type '" "TruncatedSphere const *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - result = (double)((TruncatedSphere const *)arg1)->removedTop(); + { + try { + result = (double)((TruncatedSphere const *)arg1)->removedTop(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51586,7 +60036,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_height(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSphere_height" "', argument " "1"" of type '" "TruncatedSphere const *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - result = (double)((TruncatedSphere const *)arg1)->height(); + { + try { + result = (double)((TruncatedSphere const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51609,7 +60069,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_radialExtension(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSphere_radialExtension" "', argument " "1"" of type '" "TruncatedSphere const *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - result = (double)((TruncatedSphere const *)arg1)->radialExtension(); + { + try { + result = (double)((TruncatedSphere const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51647,7 +60117,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_formfactor(PyObject *self, PyObject * if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((TruncatedSphere const *)arg1)->formfactor(arg2); + { + try { + result = ((TruncatedSphere const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -51670,7 +60150,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSphere_validate(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSphere_validate" "', argument " "1"" of type '" "TruncatedSphere const *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - result = ((TruncatedSphere const *)arg1)->validate(); + { + try { + result = ((TruncatedSphere const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -51692,7 +60182,17 @@ SWIGINTERN PyObject *_wrap_delete_TruncatedSphere(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TruncatedSphere" "', argument " "1"" of type '" "TruncatedSphere *""'"); } arg1 = reinterpret_cast< TruncatedSphere * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -51748,7 +60248,17 @@ SWIGINTERN PyObject *_wrap_new_TruncatedSpheroid__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_TruncatedSpheroid" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (TruncatedSpheroid *)new TruncatedSpheroid(arg1,arg2,arg3,arg4); + { + try { + result = (TruncatedSpheroid *)new TruncatedSpheroid(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TruncatedSpheroid, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -51771,7 +60281,17 @@ SWIGINTERN PyObject *_wrap_new_TruncatedSpheroid__SWIG_1(PyObject *self, Py_ssiz arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (TruncatedSpheroid *)new TruncatedSpheroid(arg1); + { + try { + result = (TruncatedSpheroid *)new TruncatedSpheroid(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TruncatedSpheroid, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -51848,7 +60368,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_clone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_clone" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = (TruncatedSpheroid *)((TruncatedSpheroid const *)arg1)->clone(); + { + try { + result = (TruncatedSpheroid *)((TruncatedSpheroid const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TruncatedSpheroid, 0 | 0 ); return resultobj; fail: @@ -51871,7 +60401,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_className" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = ((TruncatedSpheroid const *)arg1)->className(); + { + try { + result = ((TruncatedSpheroid const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -51894,7 +60434,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_parDefs(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_parDefs" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = ((TruncatedSpheroid const *)arg1)->parDefs(); + { + try { + result = ((TruncatedSpheroid const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -51917,7 +60467,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_radius(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_radius" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = (double)((TruncatedSpheroid const *)arg1)->radius(); + { + try { + result = (double)((TruncatedSpheroid const *)arg1)->radius(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51940,7 +60500,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_untruncated_height(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_untruncated_height" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = (double)((TruncatedSpheroid const *)arg1)->untruncated_height(); + { + try { + result = (double)((TruncatedSpheroid const *)arg1)->untruncated_height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51963,7 +60533,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_heightFlattening(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_heightFlattening" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = (double)((TruncatedSpheroid const *)arg1)->heightFlattening(); + { + try { + result = (double)((TruncatedSpheroid const *)arg1)->heightFlattening(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -51986,7 +60566,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_removedTop(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_removedTop" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = (double)((TruncatedSpheroid const *)arg1)->removedTop(); + { + try { + result = (double)((TruncatedSpheroid const *)arg1)->removedTop(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -52009,7 +60599,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_height(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_height" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = (double)((TruncatedSpheroid const *)arg1)->height(); + { + try { + result = (double)((TruncatedSpheroid const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -52032,7 +60632,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_radialExtension(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_radialExtension" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = (double)((TruncatedSpheroid const *)arg1)->radialExtension(); + { + try { + result = (double)((TruncatedSpheroid const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -52070,7 +60680,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_formfactor(PyObject *self, PyObject if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((TruncatedSpheroid const *)arg1)->formfactor(arg2); + { + try { + result = ((TruncatedSpheroid const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -52093,7 +60713,17 @@ SWIGINTERN PyObject *_wrap_TruncatedSpheroid_validate(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TruncatedSpheroid_validate" "', argument " "1"" of type '" "TruncatedSpheroid const *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - result = ((TruncatedSpheroid const *)arg1)->validate(); + { + try { + result = ((TruncatedSpheroid const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -52115,7 +60745,17 @@ SWIGINTERN PyObject *_wrap_delete_TruncatedSpheroid(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TruncatedSpheroid" "', argument " "1"" of type '" "TruncatedSpheroid *""'"); } arg1 = reinterpret_cast< TruncatedSpheroid * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -52163,7 +60803,17 @@ SWIGINTERN PyObject *_wrap_new_BarGauss__SWIG_0(PyObject *self, Py_ssize_t nobjs SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BarGauss" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (BarGauss *)new BarGauss(arg1,arg2,arg3); + { + try { + result = (BarGauss *)new BarGauss(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BarGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -52186,7 +60836,17 @@ SWIGINTERN PyObject *_wrap_new_BarGauss__SWIG_1(PyObject *self, Py_ssize_t nobjs arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (BarGauss *)new BarGauss(arg1); + { + try { + result = (BarGauss *)new BarGauss(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BarGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -52257,7 +60917,17 @@ SWIGINTERN PyObject *_wrap_BarGauss_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarGauss_clone" "', argument " "1"" of type '" "BarGauss const *""'"); } arg1 = reinterpret_cast< BarGauss * >(argp1); - result = (BarGauss *)((BarGauss const *)arg1)->clone(); + { + try { + result = (BarGauss *)((BarGauss const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BarGauss, 0 | 0 ); return resultobj; fail: @@ -52280,7 +60950,17 @@ SWIGINTERN PyObject *_wrap_BarGauss_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarGauss_className" "', argument " "1"" of type '" "BarGauss const *""'"); } arg1 = reinterpret_cast< BarGauss * >(argp1); - result = ((BarGauss const *)arg1)->className(); + { + try { + result = ((BarGauss const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -52303,7 +60983,17 @@ SWIGINTERN PyObject *_wrap_BarGauss_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarGauss_parDefs" "', argument " "1"" of type '" "BarGauss const *""'"); } arg1 = reinterpret_cast< BarGauss * >(argp1); - result = ((BarGauss const *)arg1)->parDefs(); + { + try { + result = ((BarGauss const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -52325,7 +61015,17 @@ SWIGINTERN PyObject *_wrap_delete_BarGauss(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BarGauss" "', argument " "1"" of type '" "BarGauss *""'"); } arg1 = reinterpret_cast< BarGauss * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -52373,7 +61073,17 @@ SWIGINTERN PyObject *_wrap_new_BarLorentz__SWIG_0(PyObject *self, Py_ssize_t nob SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BarLorentz" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (BarLorentz *)new BarLorentz(arg1,arg2,arg3); + { + try { + result = (BarLorentz *)new BarLorentz(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BarLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -52396,7 +61106,17 @@ SWIGINTERN PyObject *_wrap_new_BarLorentz__SWIG_1(PyObject *self, Py_ssize_t nob arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (BarLorentz *)new BarLorentz(arg1); + { + try { + result = (BarLorentz *)new BarLorentz(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BarLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -52467,7 +61187,17 @@ SWIGINTERN PyObject *_wrap_BarLorentz_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarLorentz_clone" "', argument " "1"" of type '" "BarLorentz const *""'"); } arg1 = reinterpret_cast< BarLorentz * >(argp1); - result = (BarLorentz *)((BarLorentz const *)arg1)->clone(); + { + try { + result = (BarLorentz *)((BarLorentz const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BarLorentz, 0 | 0 ); return resultobj; fail: @@ -52490,7 +61220,17 @@ SWIGINTERN PyObject *_wrap_BarLorentz_className(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarLorentz_className" "', argument " "1"" of type '" "BarLorentz const *""'"); } arg1 = reinterpret_cast< BarLorentz * >(argp1); - result = ((BarLorentz const *)arg1)->className(); + { + try { + result = ((BarLorentz const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -52513,7 +61253,17 @@ SWIGINTERN PyObject *_wrap_BarLorentz_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarLorentz_parDefs" "', argument " "1"" of type '" "BarLorentz const *""'"); } arg1 = reinterpret_cast< BarLorentz * >(argp1); - result = ((BarLorentz const *)arg1)->parDefs(); + { + try { + result = ((BarLorentz const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -52535,7 +61285,17 @@ SWIGINTERN PyObject *_wrap_delete_BarLorentz(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BarLorentz" "', argument " "1"" of type '" "BarLorentz *""'"); } arg1 = reinterpret_cast< BarLorentz * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -52583,7 +61343,17 @@ SWIGINTERN PyObject *_wrap_new_CosineRippleBox__SWIG_0(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CosineRippleBox" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (CosineRippleBox *)new CosineRippleBox(arg1,arg2,arg3); + { + try { + result = (CosineRippleBox *)new CosineRippleBox(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CosineRippleBox, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -52606,7 +61376,17 @@ SWIGINTERN PyObject *_wrap_new_CosineRippleBox__SWIG_1(PyObject *self, Py_ssize_ arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (CosineRippleBox *)new CosineRippleBox(arg1); + { + try { + result = (CosineRippleBox *)new CosineRippleBox(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CosineRippleBox, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -52677,7 +61457,17 @@ SWIGINTERN PyObject *_wrap_CosineRippleBox_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CosineRippleBox_clone" "', argument " "1"" of type '" "CosineRippleBox const *""'"); } arg1 = reinterpret_cast< CosineRippleBox * >(argp1); - result = (CosineRippleBox *)((CosineRippleBox const *)arg1)->clone(); + { + try { + result = (CosineRippleBox *)((CosineRippleBox const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CosineRippleBox, 0 | 0 ); return resultobj; fail: @@ -52700,7 +61490,17 @@ SWIGINTERN PyObject *_wrap_CosineRippleBox_className(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CosineRippleBox_className" "', argument " "1"" of type '" "CosineRippleBox const *""'"); } arg1 = reinterpret_cast< CosineRippleBox * >(argp1); - result = ((CosineRippleBox const *)arg1)->className(); + { + try { + result = ((CosineRippleBox const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -52723,7 +61523,17 @@ SWIGINTERN PyObject *_wrap_CosineRippleBox_parDefs(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CosineRippleBox_parDefs" "', argument " "1"" of type '" "CosineRippleBox const *""'"); } arg1 = reinterpret_cast< CosineRippleBox * >(argp1); - result = ((CosineRippleBox const *)arg1)->parDefs(); + { + try { + result = ((CosineRippleBox const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -52745,7 +61555,17 @@ SWIGINTERN PyObject *_wrap_delete_CosineRippleBox(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CosineRippleBox" "', argument " "1"" of type '" "CosineRippleBox *""'"); } arg1 = reinterpret_cast< CosineRippleBox * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -52793,7 +61613,17 @@ SWIGINTERN PyObject *_wrap_new_CosineRippleGauss__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CosineRippleGauss" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (CosineRippleGauss *)new CosineRippleGauss(arg1,arg2,arg3); + { + try { + result = (CosineRippleGauss *)new CosineRippleGauss(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CosineRippleGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -52816,7 +61646,17 @@ SWIGINTERN PyObject *_wrap_new_CosineRippleGauss__SWIG_1(PyObject *self, Py_ssiz arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (CosineRippleGauss *)new CosineRippleGauss(arg1); + { + try { + result = (CosineRippleGauss *)new CosineRippleGauss(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CosineRippleGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -52887,7 +61727,17 @@ SWIGINTERN PyObject *_wrap_CosineRippleGauss_clone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CosineRippleGauss_clone" "', argument " "1"" of type '" "CosineRippleGauss const *""'"); } arg1 = reinterpret_cast< CosineRippleGauss * >(argp1); - result = (CosineRippleGauss *)((CosineRippleGauss const *)arg1)->clone(); + { + try { + result = (CosineRippleGauss *)((CosineRippleGauss const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CosineRippleGauss, 0 | 0 ); return resultobj; fail: @@ -52910,7 +61760,17 @@ SWIGINTERN PyObject *_wrap_CosineRippleGauss_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CosineRippleGauss_className" "', argument " "1"" of type '" "CosineRippleGauss const *""'"); } arg1 = reinterpret_cast< CosineRippleGauss * >(argp1); - result = ((CosineRippleGauss const *)arg1)->className(); + { + try { + result = ((CosineRippleGauss const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -52933,7 +61793,17 @@ SWIGINTERN PyObject *_wrap_CosineRippleGauss_parDefs(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CosineRippleGauss_parDefs" "', argument " "1"" of type '" "CosineRippleGauss const *""'"); } arg1 = reinterpret_cast< CosineRippleGauss * >(argp1); - result = ((CosineRippleGauss const *)arg1)->parDefs(); + { + try { + result = ((CosineRippleGauss const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -52955,7 +61825,17 @@ SWIGINTERN PyObject *_wrap_delete_CosineRippleGauss(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CosineRippleGauss" "', argument " "1"" of type '" "CosineRippleGauss *""'"); } arg1 = reinterpret_cast< CosineRippleGauss * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -53003,7 +61883,17 @@ SWIGINTERN PyObject *_wrap_new_CosineRippleLorentz__SWIG_0(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CosineRippleLorentz" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (CosineRippleLorentz *)new CosineRippleLorentz(arg1,arg2,arg3); + { + try { + result = (CosineRippleLorentz *)new CosineRippleLorentz(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CosineRippleLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53026,7 +61916,17 @@ SWIGINTERN PyObject *_wrap_new_CosineRippleLorentz__SWIG_1(PyObject *self, Py_ss arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (CosineRippleLorentz *)new CosineRippleLorentz(arg1); + { + try { + result = (CosineRippleLorentz *)new CosineRippleLorentz(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CosineRippleLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53097,7 +61997,17 @@ SWIGINTERN PyObject *_wrap_CosineRippleLorentz_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CosineRippleLorentz_clone" "', argument " "1"" of type '" "CosineRippleLorentz const *""'"); } arg1 = reinterpret_cast< CosineRippleLorentz * >(argp1); - result = (CosineRippleLorentz *)((CosineRippleLorentz const *)arg1)->clone(); + { + try { + result = (CosineRippleLorentz *)((CosineRippleLorentz const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CosineRippleLorentz, 0 | 0 ); return resultobj; fail: @@ -53120,7 +62030,17 @@ SWIGINTERN PyObject *_wrap_CosineRippleLorentz_className(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CosineRippleLorentz_className" "', argument " "1"" of type '" "CosineRippleLorentz const *""'"); } arg1 = reinterpret_cast< CosineRippleLorentz * >(argp1); - result = ((CosineRippleLorentz const *)arg1)->className(); + { + try { + result = ((CosineRippleLorentz const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -53143,7 +62063,17 @@ SWIGINTERN PyObject *_wrap_CosineRippleLorentz_parDefs(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CosineRippleLorentz_parDefs" "', argument " "1"" of type '" "CosineRippleLorentz const *""'"); } arg1 = reinterpret_cast< CosineRippleLorentz * >(argp1); - result = ((CosineRippleLorentz const *)arg1)->parDefs(); + { + try { + result = ((CosineRippleLorentz const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -53165,7 +62095,17 @@ SWIGINTERN PyObject *_wrap_delete_CosineRippleLorentz(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CosineRippleLorentz" "', argument " "1"" of type '" "CosineRippleLorentz *""'"); } arg1 = reinterpret_cast< CosineRippleLorentz * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -53221,7 +62161,17 @@ SWIGINTERN PyObject *_wrap_new_SawtoothRippleBox__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SawtoothRippleBox" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (SawtoothRippleBox *)new SawtoothRippleBox(arg1,arg2,arg3,arg4); + { + try { + result = (SawtoothRippleBox *)new SawtoothRippleBox(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SawtoothRippleBox, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53244,7 +62194,17 @@ SWIGINTERN PyObject *_wrap_new_SawtoothRippleBox__SWIG_1(PyObject *self, Py_ssiz arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (SawtoothRippleBox *)new SawtoothRippleBox(arg1); + { + try { + result = (SawtoothRippleBox *)new SawtoothRippleBox(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SawtoothRippleBox, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53321,7 +62281,17 @@ SWIGINTERN PyObject *_wrap_SawtoothRippleBox_clone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SawtoothRippleBox_clone" "', argument " "1"" of type '" "SawtoothRippleBox const *""'"); } arg1 = reinterpret_cast< SawtoothRippleBox * >(argp1); - result = (SawtoothRippleBox *)((SawtoothRippleBox const *)arg1)->clone(); + { + try { + result = (SawtoothRippleBox *)((SawtoothRippleBox const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SawtoothRippleBox, 0 | 0 ); return resultobj; fail: @@ -53344,7 +62314,17 @@ SWIGINTERN PyObject *_wrap_SawtoothRippleBox_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SawtoothRippleBox_className" "', argument " "1"" of type '" "SawtoothRippleBox const *""'"); } arg1 = reinterpret_cast< SawtoothRippleBox * >(argp1); - result = ((SawtoothRippleBox const *)arg1)->className(); + { + try { + result = ((SawtoothRippleBox const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -53367,7 +62347,17 @@ SWIGINTERN PyObject *_wrap_SawtoothRippleBox_parDefs(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SawtoothRippleBox_parDefs" "', argument " "1"" of type '" "SawtoothRippleBox const *""'"); } arg1 = reinterpret_cast< SawtoothRippleBox * >(argp1); - result = ((SawtoothRippleBox const *)arg1)->parDefs(); + { + try { + result = ((SawtoothRippleBox const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -53389,7 +62379,17 @@ SWIGINTERN PyObject *_wrap_delete_SawtoothRippleBox(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SawtoothRippleBox" "', argument " "1"" of type '" "SawtoothRippleBox *""'"); } arg1 = reinterpret_cast< SawtoothRippleBox * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -53445,7 +62445,17 @@ SWIGINTERN PyObject *_wrap_new_SawtoothRippleGauss__SWIG_0(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SawtoothRippleGauss" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (SawtoothRippleGauss *)new SawtoothRippleGauss(arg1,arg2,arg3,arg4); + { + try { + result = (SawtoothRippleGauss *)new SawtoothRippleGauss(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SawtoothRippleGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53468,7 +62478,17 @@ SWIGINTERN PyObject *_wrap_new_SawtoothRippleGauss__SWIG_1(PyObject *self, Py_ss arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (SawtoothRippleGauss *)new SawtoothRippleGauss(arg1); + { + try { + result = (SawtoothRippleGauss *)new SawtoothRippleGauss(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SawtoothRippleGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53545,7 +62565,17 @@ SWIGINTERN PyObject *_wrap_SawtoothRippleGauss_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SawtoothRippleGauss_clone" "', argument " "1"" of type '" "SawtoothRippleGauss const *""'"); } arg1 = reinterpret_cast< SawtoothRippleGauss * >(argp1); - result = (SawtoothRippleGauss *)((SawtoothRippleGauss const *)arg1)->clone(); + { + try { + result = (SawtoothRippleGauss *)((SawtoothRippleGauss const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SawtoothRippleGauss, 0 | 0 ); return resultobj; fail: @@ -53568,7 +62598,17 @@ SWIGINTERN PyObject *_wrap_SawtoothRippleGauss_className(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SawtoothRippleGauss_className" "', argument " "1"" of type '" "SawtoothRippleGauss const *""'"); } arg1 = reinterpret_cast< SawtoothRippleGauss * >(argp1); - result = ((SawtoothRippleGauss const *)arg1)->className(); + { + try { + result = ((SawtoothRippleGauss const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -53591,7 +62631,17 @@ SWIGINTERN PyObject *_wrap_SawtoothRippleGauss_parDefs(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SawtoothRippleGauss_parDefs" "', argument " "1"" of type '" "SawtoothRippleGauss const *""'"); } arg1 = reinterpret_cast< SawtoothRippleGauss * >(argp1); - result = ((SawtoothRippleGauss const *)arg1)->parDefs(); + { + try { + result = ((SawtoothRippleGauss const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -53613,7 +62663,17 @@ SWIGINTERN PyObject *_wrap_delete_SawtoothRippleGauss(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SawtoothRippleGauss" "', argument " "1"" of type '" "SawtoothRippleGauss *""'"); } arg1 = reinterpret_cast< SawtoothRippleGauss * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -53669,7 +62729,17 @@ SWIGINTERN PyObject *_wrap_new_SawtoothRippleLorentz__SWIG_0(PyObject *self, Py_ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SawtoothRippleLorentz" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (SawtoothRippleLorentz *)new SawtoothRippleLorentz(arg1,arg2,arg3,arg4); + { + try { + result = (SawtoothRippleLorentz *)new SawtoothRippleLorentz(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SawtoothRippleLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53692,7 +62762,17 @@ SWIGINTERN PyObject *_wrap_new_SawtoothRippleLorentz__SWIG_1(PyObject *self, Py_ arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (SawtoothRippleLorentz *)new SawtoothRippleLorentz(arg1); + { + try { + result = (SawtoothRippleLorentz *)new SawtoothRippleLorentz(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SawtoothRippleLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53769,7 +62849,17 @@ SWIGINTERN PyObject *_wrap_SawtoothRippleLorentz_clone(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SawtoothRippleLorentz_clone" "', argument " "1"" of type '" "SawtoothRippleLorentz const *""'"); } arg1 = reinterpret_cast< SawtoothRippleLorentz * >(argp1); - result = (SawtoothRippleLorentz *)((SawtoothRippleLorentz const *)arg1)->clone(); + { + try { + result = (SawtoothRippleLorentz *)((SawtoothRippleLorentz const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SawtoothRippleLorentz, 0 | 0 ); return resultobj; fail: @@ -53792,7 +62882,17 @@ SWIGINTERN PyObject *_wrap_SawtoothRippleLorentz_className(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SawtoothRippleLorentz_className" "', argument " "1"" of type '" "SawtoothRippleLorentz const *""'"); } arg1 = reinterpret_cast< SawtoothRippleLorentz * >(argp1); - result = ((SawtoothRippleLorentz const *)arg1)->className(); + { + try { + result = ((SawtoothRippleLorentz const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -53815,7 +62915,17 @@ SWIGINTERN PyObject *_wrap_SawtoothRippleLorentz_parDefs(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SawtoothRippleLorentz_parDefs" "', argument " "1"" of type '" "SawtoothRippleLorentz const *""'"); } arg1 = reinterpret_cast< SawtoothRippleLorentz * >(argp1); - result = ((SawtoothRippleLorentz const *)arg1)->parDefs(); + { + try { + result = ((SawtoothRippleLorentz const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -53837,7 +62947,17 @@ SWIGINTERN PyObject *_wrap_delete_SawtoothRippleLorentz(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SawtoothRippleLorentz" "', argument " "1"" of type '" "SawtoothRippleLorentz *""'"); } arg1 = reinterpret_cast< SawtoothRippleLorentz * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -53885,7 +63005,17 @@ SWIGINTERN PyObject *_wrap_new_LongBoxGauss__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LongBoxGauss" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (LongBoxGauss *)new LongBoxGauss(arg1,arg2,arg3); + { + try { + result = (LongBoxGauss *)new LongBoxGauss(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LongBoxGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53908,7 +63038,17 @@ SWIGINTERN PyObject *_wrap_new_LongBoxGauss__SWIG_1(PyObject *self, Py_ssize_t n arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (LongBoxGauss *)new LongBoxGauss(arg1); + { + try { + result = (LongBoxGauss *)new LongBoxGauss(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LongBoxGauss, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -53979,7 +63119,17 @@ SWIGINTERN PyObject *_wrap_LongBoxGauss_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxGauss_clone" "', argument " "1"" of type '" "LongBoxGauss const *""'"); } arg1 = reinterpret_cast< LongBoxGauss * >(argp1); - result = (LongBoxGauss *)((LongBoxGauss const *)arg1)->clone(); + { + try { + result = (LongBoxGauss *)((LongBoxGauss const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LongBoxGauss, 0 | 0 ); return resultobj; fail: @@ -54002,7 +63152,17 @@ SWIGINTERN PyObject *_wrap_LongBoxGauss_className(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxGauss_className" "', argument " "1"" of type '" "LongBoxGauss const *""'"); } arg1 = reinterpret_cast< LongBoxGauss * >(argp1); - result = ((LongBoxGauss const *)arg1)->className(); + { + try { + result = ((LongBoxGauss const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -54025,7 +63185,17 @@ SWIGINTERN PyObject *_wrap_LongBoxGauss_parDefs(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxGauss_parDefs" "', argument " "1"" of type '" "LongBoxGauss const *""'"); } arg1 = reinterpret_cast< LongBoxGauss * >(argp1); - result = ((LongBoxGauss const *)arg1)->parDefs(); + { + try { + result = ((LongBoxGauss const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -54048,7 +63218,17 @@ SWIGINTERN PyObject *_wrap_LongBoxGauss_length(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxGauss_length" "', argument " "1"" of type '" "LongBoxGauss const *""'"); } arg1 = reinterpret_cast< LongBoxGauss * >(argp1); - result = (double)((LongBoxGauss const *)arg1)->length(); + { + try { + result = (double)((LongBoxGauss const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54071,7 +63251,17 @@ SWIGINTERN PyObject *_wrap_LongBoxGauss_height(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxGauss_height" "', argument " "1"" of type '" "LongBoxGauss const *""'"); } arg1 = reinterpret_cast< LongBoxGauss * >(argp1); - result = (double)((LongBoxGauss const *)arg1)->height(); + { + try { + result = (double)((LongBoxGauss const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54094,7 +63284,17 @@ SWIGINTERN PyObject *_wrap_LongBoxGauss_width(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxGauss_width" "', argument " "1"" of type '" "LongBoxGauss const *""'"); } arg1 = reinterpret_cast< LongBoxGauss * >(argp1); - result = (double)((LongBoxGauss const *)arg1)->width(); + { + try { + result = (double)((LongBoxGauss const *)arg1)->width(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54117,7 +63317,17 @@ SWIGINTERN PyObject *_wrap_LongBoxGauss_radialExtension(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxGauss_radialExtension" "', argument " "1"" of type '" "LongBoxGauss const *""'"); } arg1 = reinterpret_cast< LongBoxGauss * >(argp1); - result = (double)((LongBoxGauss const *)arg1)->radialExtension(); + { + try { + result = (double)((LongBoxGauss const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54155,7 +63365,17 @@ SWIGINTERN PyObject *_wrap_LongBoxGauss_formfactor(PyObject *self, PyObject *arg if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((LongBoxGauss const *)arg1)->formfactor(arg2); + { + try { + result = ((LongBoxGauss const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -54178,7 +63398,17 @@ SWIGINTERN PyObject *_wrap_LongBoxGauss_validate(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxGauss_validate" "', argument " "1"" of type '" "LongBoxGauss const *""'"); } arg1 = reinterpret_cast< LongBoxGauss * >(argp1); - result = ((LongBoxGauss const *)arg1)->validate(); + { + try { + result = ((LongBoxGauss const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -54200,7 +63430,17 @@ SWIGINTERN PyObject *_wrap_delete_LongBoxGauss(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LongBoxGauss" "', argument " "1"" of type '" "LongBoxGauss *""'"); } arg1 = reinterpret_cast< LongBoxGauss * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -54248,7 +63488,17 @@ SWIGINTERN PyObject *_wrap_new_LongBoxLorentz__SWIG_0(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LongBoxLorentz" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (LongBoxLorentz *)new LongBoxLorentz(arg1,arg2,arg3); + { + try { + result = (LongBoxLorentz *)new LongBoxLorentz(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LongBoxLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -54271,7 +63521,17 @@ SWIGINTERN PyObject *_wrap_new_LongBoxLorentz__SWIG_1(PyObject *self, Py_ssize_t arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (LongBoxLorentz *)new LongBoxLorentz(arg1); + { + try { + result = (LongBoxLorentz *)new LongBoxLorentz(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LongBoxLorentz, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -54342,7 +63602,17 @@ SWIGINTERN PyObject *_wrap_LongBoxLorentz_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxLorentz_clone" "', argument " "1"" of type '" "LongBoxLorentz const *""'"); } arg1 = reinterpret_cast< LongBoxLorentz * >(argp1); - result = (LongBoxLorentz *)((LongBoxLorentz const *)arg1)->clone(); + { + try { + result = (LongBoxLorentz *)((LongBoxLorentz const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LongBoxLorentz, 0 | 0 ); return resultobj; fail: @@ -54365,7 +63635,17 @@ SWIGINTERN PyObject *_wrap_LongBoxLorentz_className(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxLorentz_className" "', argument " "1"" of type '" "LongBoxLorentz const *""'"); } arg1 = reinterpret_cast< LongBoxLorentz * >(argp1); - result = ((LongBoxLorentz const *)arg1)->className(); + { + try { + result = ((LongBoxLorentz const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -54388,7 +63668,17 @@ SWIGINTERN PyObject *_wrap_LongBoxLorentz_parDefs(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxLorentz_parDefs" "', argument " "1"" of type '" "LongBoxLorentz const *""'"); } arg1 = reinterpret_cast< LongBoxLorentz * >(argp1); - result = ((LongBoxLorentz const *)arg1)->parDefs(); + { + try { + result = ((LongBoxLorentz const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -54411,7 +63701,17 @@ SWIGINTERN PyObject *_wrap_LongBoxLorentz_length(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxLorentz_length" "', argument " "1"" of type '" "LongBoxLorentz const *""'"); } arg1 = reinterpret_cast< LongBoxLorentz * >(argp1); - result = (double)((LongBoxLorentz const *)arg1)->length(); + { + try { + result = (double)((LongBoxLorentz const *)arg1)->length(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54434,7 +63734,17 @@ SWIGINTERN PyObject *_wrap_LongBoxLorentz_height(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxLorentz_height" "', argument " "1"" of type '" "LongBoxLorentz const *""'"); } arg1 = reinterpret_cast< LongBoxLorentz * >(argp1); - result = (double)((LongBoxLorentz const *)arg1)->height(); + { + try { + result = (double)((LongBoxLorentz const *)arg1)->height(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54457,7 +63767,17 @@ SWIGINTERN PyObject *_wrap_LongBoxLorentz_width(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxLorentz_width" "', argument " "1"" of type '" "LongBoxLorentz const *""'"); } arg1 = reinterpret_cast< LongBoxLorentz * >(argp1); - result = (double)((LongBoxLorentz const *)arg1)->width(); + { + try { + result = (double)((LongBoxLorentz const *)arg1)->width(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54480,7 +63800,17 @@ SWIGINTERN PyObject *_wrap_LongBoxLorentz_radialExtension(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxLorentz_radialExtension" "', argument " "1"" of type '" "LongBoxLorentz const *""'"); } arg1 = reinterpret_cast< LongBoxLorentz * >(argp1); - result = (double)((LongBoxLorentz const *)arg1)->radialExtension(); + { + try { + result = (double)((LongBoxLorentz const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54518,7 +63848,17 @@ SWIGINTERN PyObject *_wrap_LongBoxLorentz_formfactor(PyObject *self, PyObject *a if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((LongBoxLorentz const *)arg1)->formfactor(arg2); + { + try { + result = ((LongBoxLorentz const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -54541,7 +63881,17 @@ SWIGINTERN PyObject *_wrap_LongBoxLorentz_validate(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongBoxLorentz_validate" "', argument " "1"" of type '" "LongBoxLorentz const *""'"); } arg1 = reinterpret_cast< LongBoxLorentz * >(argp1); - result = ((LongBoxLorentz const *)arg1)->validate(); + { + try { + result = ((LongBoxLorentz const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -54563,7 +63913,17 @@ SWIGINTERN PyObject *_wrap_delete_LongBoxLorentz(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LongBoxLorentz" "', argument " "1"" of type '" "LongBoxLorentz *""'"); } arg1 = reinterpret_cast< LongBoxLorentz * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -54597,7 +63957,17 @@ SWIGINTERN PyObject *_wrap_new_GaussSphere__SWIG_0(PyObject *self, Py_ssize_t no arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (GaussSphere *)new GaussSphere(arg1); + { + try { + result = (GaussSphere *)new GaussSphere(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussSphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -54618,7 +63988,17 @@ SWIGINTERN PyObject *_wrap_new_GaussSphere__SWIG_1(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussSphere" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (GaussSphere *)new GaussSphere(arg1); + { + try { + result = (GaussSphere *)new GaussSphere(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussSphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -54677,7 +64057,17 @@ SWIGINTERN PyObject *_wrap_GaussSphere_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussSphere_clone" "', argument " "1"" of type '" "GaussSphere const *""'"); } arg1 = reinterpret_cast< GaussSphere * >(argp1); - result = (GaussSphere *)((GaussSphere const *)arg1)->clone(); + { + try { + result = (GaussSphere *)((GaussSphere const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussSphere, 0 | 0 ); return resultobj; fail: @@ -54700,7 +64090,17 @@ SWIGINTERN PyObject *_wrap_GaussSphere_className(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussSphere_className" "', argument " "1"" of type '" "GaussSphere const *""'"); } arg1 = reinterpret_cast< GaussSphere * >(argp1); - result = ((GaussSphere const *)arg1)->className(); + { + try { + result = ((GaussSphere const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -54723,7 +64123,17 @@ SWIGINTERN PyObject *_wrap_GaussSphere_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussSphere_parDefs" "', argument " "1"" of type '" "GaussSphere const *""'"); } arg1 = reinterpret_cast< GaussSphere * >(argp1); - result = ((GaussSphere const *)arg1)->parDefs(); + { + try { + result = ((GaussSphere const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -54746,7 +64156,17 @@ SWIGINTERN PyObject *_wrap_GaussSphere_meanRadius(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussSphere_meanRadius" "', argument " "1"" of type '" "GaussSphere const *""'"); } arg1 = reinterpret_cast< GaussSphere * >(argp1); - result = (double)((GaussSphere const *)arg1)->meanRadius(); + { + try { + result = (double)((GaussSphere const *)arg1)->meanRadius(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54769,7 +64189,17 @@ SWIGINTERN PyObject *_wrap_GaussSphere_radialExtension(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussSphere_radialExtension" "', argument " "1"" of type '" "GaussSphere const *""'"); } arg1 = reinterpret_cast< GaussSphere * >(argp1); - result = (double)((GaussSphere const *)arg1)->radialExtension(); + { + try { + result = (double)((GaussSphere const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -54807,7 +64237,17 @@ SWIGINTERN PyObject *_wrap_GaussSphere_formfactor(PyObject *self, PyObject *args if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((GaussSphere const *)arg1)->formfactor(arg2); + { + try { + result = ((GaussSphere const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -54830,7 +64270,17 @@ SWIGINTERN PyObject *_wrap_GaussSphere_validate(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussSphere_validate" "', argument " "1"" of type '" "GaussSphere const *""'"); } arg1 = reinterpret_cast< GaussSphere * >(argp1); - result = ((GaussSphere const *)arg1)->validate(); + { + try { + result = ((GaussSphere const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -54852,7 +64302,17 @@ SWIGINTERN PyObject *_wrap_delete_GaussSphere(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussSphere" "', argument " "1"" of type '" "GaussSphere *""'"); } arg1 = reinterpret_cast< GaussSphere * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -54886,7 +64346,17 @@ SWIGINTERN PyObject *_wrap_new_FuzzySphere__SWIG_0(PyObject *self, Py_ssize_t no arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (FuzzySphere *)new FuzzySphere(arg1); + { + try { + result = (FuzzySphere *)new FuzzySphere(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuzzySphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -54915,7 +64385,17 @@ SWIGINTERN PyObject *_wrap_new_FuzzySphere__SWIG_1(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FuzzySphere" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (FuzzySphere *)new FuzzySphere(arg1,arg2); + { + try { + result = (FuzzySphere *)new FuzzySphere(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuzzySphere, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -54980,7 +64460,17 @@ SWIGINTERN PyObject *_wrap_FuzzySphere_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FuzzySphere_clone" "', argument " "1"" of type '" "FuzzySphere const *""'"); } arg1 = reinterpret_cast< FuzzySphere * >(argp1); - result = (FuzzySphere *)((FuzzySphere const *)arg1)->clone(); + { + try { + result = (FuzzySphere *)((FuzzySphere const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuzzySphere, 0 | 0 ); return resultobj; fail: @@ -55003,7 +64493,17 @@ SWIGINTERN PyObject *_wrap_FuzzySphere_className(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FuzzySphere_className" "', argument " "1"" of type '" "FuzzySphere const *""'"); } arg1 = reinterpret_cast< FuzzySphere * >(argp1); - result = ((FuzzySphere const *)arg1)->className(); + { + try { + result = ((FuzzySphere const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -55026,7 +64526,17 @@ SWIGINTERN PyObject *_wrap_FuzzySphere_parDefs(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FuzzySphere_parDefs" "', argument " "1"" of type '" "FuzzySphere const *""'"); } arg1 = reinterpret_cast< FuzzySphere * >(argp1); - result = ((FuzzySphere const *)arg1)->parDefs(); + { + try { + result = ((FuzzySphere const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -55049,7 +64559,17 @@ SWIGINTERN PyObject *_wrap_FuzzySphere_radialExtension(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FuzzySphere_radialExtension" "', argument " "1"" of type '" "FuzzySphere const *""'"); } arg1 = reinterpret_cast< FuzzySphere * >(argp1); - result = (double)((FuzzySphere const *)arg1)->radialExtension(); + { + try { + result = (double)((FuzzySphere const *)arg1)->radialExtension(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -55087,7 +64607,17 @@ SWIGINTERN PyObject *_wrap_FuzzySphere_formfactor(PyObject *self, PyObject *args if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((FuzzySphere const *)arg1)->formfactor(arg2); + { + try { + result = ((FuzzySphere const *)arg1)->formfactor(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -55110,7 +64640,17 @@ SWIGINTERN PyObject *_wrap_FuzzySphere_validate(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FuzzySphere_validate" "', argument " "1"" of type '" "FuzzySphere const *""'"); } arg1 = reinterpret_cast< FuzzySphere * >(argp1); - result = ((FuzzySphere const *)arg1)->validate(); + { + try { + result = ((FuzzySphere const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -55132,7 +64672,17 @@ SWIGINTERN PyObject *_wrap_delete_FuzzySphere(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FuzzySphere" "', argument " "1"" of type '" "FuzzySphere *""'"); } arg1 = reinterpret_cast< FuzzySphere * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -55165,7 +64715,17 @@ SWIGINTERN PyObject *_wrap_delete_ISelectionRule(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ISelectionRule" "', argument " "1"" of type '" "ISelectionRule *""'"); } arg1 = reinterpret_cast< ISelectionRule * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -55188,7 +64748,17 @@ SWIGINTERN PyObject *_wrap_ISelectionRule_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISelectionRule_clone" "', argument " "1"" of type '" "ISelectionRule const *""'"); } arg1 = reinterpret_cast< ISelectionRule * >(argp1); - result = (ISelectionRule *)((ISelectionRule const *)arg1)->clone(); + { + try { + result = (ISelectionRule *)((ISelectionRule const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ISelectionRule, 0 | 0 ); return resultobj; fail: @@ -55221,7 +64791,17 @@ SWIGINTERN PyObject *_wrap_ISelectionRule_coordinateSelected(PyObject *self, PyO SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ISelectionRule_coordinateSelected" "', argument " "2"" of type '" "I3 const &""'"); } arg2 = reinterpret_cast< I3 * >(argp2); - result = (bool)((ISelectionRule const *)arg1)->coordinateSelected((I3 const &)*arg2); + { + try { + result = (bool)((ISelectionRule const *)arg1)->coordinateSelected((I3 const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -55274,7 +64854,17 @@ SWIGINTERN PyObject *_wrap_new_SimpleSelectionRule(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SimpleSelectionRule" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - result = (SimpleSelectionRule *)new SimpleSelectionRule(arg1,arg2,arg3,arg4); + { + try { + result = (SimpleSelectionRule *)new SimpleSelectionRule(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimpleSelectionRule, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -55296,7 +64886,17 @@ SWIGINTERN PyObject *_wrap_delete_SimpleSelectionRule(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleSelectionRule" "', argument " "1"" of type '" "SimpleSelectionRule *""'"); } arg1 = reinterpret_cast< SimpleSelectionRule * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -55319,7 +64919,17 @@ SWIGINTERN PyObject *_wrap_SimpleSelectionRule_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleSelectionRule_clone" "', argument " "1"" of type '" "SimpleSelectionRule const *""'"); } arg1 = reinterpret_cast< SimpleSelectionRule * >(argp1); - result = (SimpleSelectionRule *)((SimpleSelectionRule const *)arg1)->clone(); + { + try { + result = (SimpleSelectionRule *)((SimpleSelectionRule const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimpleSelectionRule, 0 | 0 ); return resultobj; fail: @@ -55352,7 +64962,17 @@ SWIGINTERN PyObject *_wrap_SimpleSelectionRule_coordinateSelected(PyObject *self SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimpleSelectionRule_coordinateSelected" "', argument " "2"" of type '" "I3 const &""'"); } arg2 = reinterpret_cast< I3 * >(argp2); - result = (bool)((SimpleSelectionRule const *)arg1)->coordinateSelected((I3 const &)*arg2); + { + try { + result = (bool)((SimpleSelectionRule const *)arg1)->coordinateSelected((I3 const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -55424,7 +65044,17 @@ SWIGINTERN PyObject *_wrap_new_Lattice3D__SWIG_0(PyObject *self, Py_ssize_t nobj if (SWIG_IsNewObj(res3)) delete temp; } } - result = (Lattice3D *)new Lattice3D(arg1,arg2,arg3); + { + try { + result = (Lattice3D *)new Lattice3D(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice3D, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -55448,7 +65078,17 @@ SWIGINTERN PyObject *_wrap_new_Lattice3D__SWIG_1(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Lattice3D" "', argument " "1"" of type '" "Lattice3D const &""'"); } arg1 = reinterpret_cast< Lattice3D * >(argp1); - result = (Lattice3D *)new Lattice3D((Lattice3D const &)*arg1); + { + try { + result = (Lattice3D *)new Lattice3D((Lattice3D const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice3D, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -55512,7 +65152,17 @@ SWIGINTERN PyObject *_wrap_delete_Lattice3D(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Lattice3D" "', argument " "1"" of type '" "Lattice3D *""'"); } arg1 = reinterpret_cast< Lattice3D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -55535,7 +65185,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_className" "', argument " "1"" of type '" "Lattice3D const *""'"); } arg1 = reinterpret_cast< Lattice3D * >(argp1); - result = ((Lattice3D const *)arg1)->className(); + { + try { + result = ((Lattice3D const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -55568,7 +65228,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_rotated(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_rotated" "', argument " "2"" of type '" "RotMatrix const &""'"); } arg2 = reinterpret_cast< RotMatrix * >(argp2); - result = ((Lattice3D const *)arg1)->rotated((RotMatrix const &)*arg2); + { + try { + result = ((Lattice3D const *)arg1)->rotated((RotMatrix const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Lattice3D(result)), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -55591,7 +65261,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_basisVectorA(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_basisVectorA" "', argument " "1"" of type '" "Lattice3D const *""'"); } arg1 = reinterpret_cast< Lattice3D * >(argp1); - result = ((Lattice3D const *)arg1)->basisVectorA(); + { + try { + result = ((Lattice3D const *)arg1)->basisVectorA(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -55614,7 +65294,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_basisVectorB(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_basisVectorB" "', argument " "1"" of type '" "Lattice3D const *""'"); } arg1 = reinterpret_cast< Lattice3D * >(argp1); - result = ((Lattice3D const *)arg1)->basisVectorB(); + { + try { + result = ((Lattice3D const *)arg1)->basisVectorB(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -55637,7 +65327,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_basisVectorC(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_basisVectorC" "', argument " "1"" of type '" "Lattice3D const *""'"); } arg1 = reinterpret_cast< Lattice3D * >(argp1); - result = ((Lattice3D const *)arg1)->basisVectorC(); + { + try { + result = ((Lattice3D const *)arg1)->basisVectorC(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -55683,7 +65383,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_getMillerDirection(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Lattice3D_getMillerDirection" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = ((Lattice3D const *)arg1)->getMillerDirection(arg2,arg3,arg4); + { + try { + result = ((Lattice3D const *)arg1)->getMillerDirection(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -55706,7 +65416,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_unitCellVolume(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice3D_unitCellVolume" "', argument " "1"" of type '" "Lattice3D const *""'"); } arg1 = reinterpret_cast< Lattice3D * >(argp1); - result = (double)((Lattice3D const *)arg1)->unitCellVolume(); + { + try { + result = (double)((Lattice3D const *)arg1)->unitCellVolume(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -55760,7 +65480,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_reciprocalLatticeBasis(PyObject *self, PyOb SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_reciprocalLatticeBasis" "', argument " "4"" of type '" "R3 &""'"); } arg4 = reinterpret_cast< R3 * >(argp4); - ((Lattice3D const *)arg1)->reciprocalLatticeBasis(*arg2,*arg3,*arg4); + { + try { + ((Lattice3D const *)arg1)->reciprocalLatticeBasis(*arg2,*arg3,*arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -55806,7 +65536,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_reciprocalLatticeVectorsWithinRadius(PyObje SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Lattice3D_reciprocalLatticeVectorsWithinRadius" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = ((Lattice3D const *)arg1)->reciprocalLatticeVectorsWithinRadius(arg2,arg3); + { + try { + result = ((Lattice3D const *)arg1)->reciprocalLatticeVectorsWithinRadius(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< Vec3< double >,std::allocator< Vec3< double > > > >(result)); return resultobj; fail: @@ -55838,7 +65578,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_setSelectionRule(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Lattice3D_setSelectionRule" "', argument " "2"" of type '" "ISelectionRule const &""'"); } arg2 = reinterpret_cast< ISelectionRule * >(argp2); - (arg1)->setSelectionRule((ISelectionRule const &)*arg2); + { + try { + (arg1)->setSelectionRule((ISelectionRule const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -55876,7 +65626,17 @@ SWIGINTERN PyObject *_wrap_Lattice3D_nearestI3(PyObject *self, PyObject *args) { if (SWIG_IsNewObj(res2)) delete temp; } } - result = ((Lattice3D const *)arg1)->nearestI3(arg2); + { + try { + result = ((Lattice3D const *)arg1)->nearestI3(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new I3(result)), SWIGTYPE_p_Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -55910,7 +65670,17 @@ SWIGINTERN PyObject *_wrap_Lattice2D_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice2D_clone" "', argument " "1"" of type '" "Lattice2D const *""'"); } arg1 = reinterpret_cast< Lattice2D * >(argp1); - result = (Lattice2D *)((Lattice2D const *)arg1)->clone(); + { + try { + result = (Lattice2D *)((Lattice2D const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Lattice2D, 0 | 0 ); return resultobj; fail: @@ -55933,7 +65703,17 @@ SWIGINTERN PyObject *_wrap_Lattice2D_length1(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice2D_length1" "', argument " "1"" of type '" "Lattice2D const *""'"); } arg1 = reinterpret_cast< Lattice2D * >(argp1); - result = (double)((Lattice2D const *)arg1)->length1(); + { + try { + result = (double)((Lattice2D const *)arg1)->length1(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -55956,7 +65736,17 @@ SWIGINTERN PyObject *_wrap_Lattice2D_length2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice2D_length2" "', argument " "1"" of type '" "Lattice2D const *""'"); } arg1 = reinterpret_cast< Lattice2D * >(argp1); - result = (double)((Lattice2D const *)arg1)->length2(); + { + try { + result = (double)((Lattice2D const *)arg1)->length2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -55979,7 +65769,17 @@ SWIGINTERN PyObject *_wrap_Lattice2D_latticeAngle(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice2D_latticeAngle" "', argument " "1"" of type '" "Lattice2D const *""'"); } arg1 = reinterpret_cast< Lattice2D * >(argp1); - result = (double)((Lattice2D const *)arg1)->latticeAngle(); + { + try { + result = (double)((Lattice2D const *)arg1)->latticeAngle(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56002,7 +65802,17 @@ SWIGINTERN PyObject *_wrap_Lattice2D_unitCellArea(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice2D_unitCellArea" "', argument " "1"" of type '" "Lattice2D const *""'"); } arg1 = reinterpret_cast< Lattice2D * >(argp1); - result = (double)((Lattice2D const *)arg1)->unitCellArea(); + { + try { + result = (double)((Lattice2D const *)arg1)->unitCellArea(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56025,7 +65835,17 @@ SWIGINTERN PyObject *_wrap_Lattice2D_rotationAngle(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice2D_rotationAngle" "', argument " "1"" of type '" "Lattice2D const *""'"); } arg1 = reinterpret_cast< Lattice2D * >(argp1); - result = (double)((Lattice2D const *)arg1)->rotationAngle(); + { + try { + result = (double)((Lattice2D const *)arg1)->rotationAngle(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56048,7 +65868,17 @@ SWIGINTERN PyObject *_wrap_Lattice2D_reciprocalBases(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Lattice2D_reciprocalBases" "', argument " "1"" of type '" "Lattice2D const *""'"); } arg1 = reinterpret_cast< Lattice2D * >(argp1); - result = ((Lattice2D const *)arg1)->reciprocalBases(); + { + try { + result = ((Lattice2D const *)arg1)->reciprocalBases(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Lattice2D::ReciprocalBases(result)), SWIGTYPE_p_Lattice2D__ReciprocalBases, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -56077,7 +65907,17 @@ SWIGINTERN PyObject *_wrap_Lattice2D_setRotationEnabled(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Lattice2D_setRotationEnabled" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); - (arg1)->setRotationEnabled(arg2); + { + try { + (arg1)->setRotationEnabled(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -56099,7 +65939,17 @@ SWIGINTERN PyObject *_wrap_delete_Lattice2D(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Lattice2D" "', argument " "1"" of type '" "Lattice2D *""'"); } arg1 = reinterpret_cast< Lattice2D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -56152,7 +66002,17 @@ SWIGINTERN PyObject *_wrap_new_BasicLattice2D(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BasicLattice2D" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (BasicLattice2D *)new BasicLattice2D(arg1,arg2,arg3,arg4); + { + try { + result = (BasicLattice2D *)new BasicLattice2D(arg1,arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BasicLattice2D, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -56175,7 +66035,17 @@ SWIGINTERN PyObject *_wrap_BasicLattice2D_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicLattice2D_clone" "', argument " "1"" of type '" "BasicLattice2D const *""'"); } arg1 = reinterpret_cast< BasicLattice2D * >(argp1); - result = (BasicLattice2D *)((BasicLattice2D const *)arg1)->clone(); + { + try { + result = (BasicLattice2D *)((BasicLattice2D const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BasicLattice2D, 0 | 0 ); return resultobj; fail: @@ -56198,7 +66068,17 @@ SWIGINTERN PyObject *_wrap_BasicLattice2D_className(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicLattice2D_className" "', argument " "1"" of type '" "BasicLattice2D const *""'"); } arg1 = reinterpret_cast< BasicLattice2D * >(argp1); - result = ((BasicLattice2D const *)arg1)->className(); + { + try { + result = ((BasicLattice2D const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -56221,7 +66101,17 @@ SWIGINTERN PyObject *_wrap_BasicLattice2D_parDefs(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicLattice2D_parDefs" "', argument " "1"" of type '" "BasicLattice2D const *""'"); } arg1 = reinterpret_cast< BasicLattice2D * >(argp1); - result = ((BasicLattice2D const *)arg1)->parDefs(); + { + try { + result = ((BasicLattice2D const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -56244,7 +66134,17 @@ SWIGINTERN PyObject *_wrap_BasicLattice2D_length1(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicLattice2D_length1" "', argument " "1"" of type '" "BasicLattice2D const *""'"); } arg1 = reinterpret_cast< BasicLattice2D * >(argp1); - result = (double)((BasicLattice2D const *)arg1)->length1(); + { + try { + result = (double)((BasicLattice2D const *)arg1)->length1(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56267,7 +66167,17 @@ SWIGINTERN PyObject *_wrap_BasicLattice2D_length2(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicLattice2D_length2" "', argument " "1"" of type '" "BasicLattice2D const *""'"); } arg1 = reinterpret_cast< BasicLattice2D * >(argp1); - result = (double)((BasicLattice2D const *)arg1)->length2(); + { + try { + result = (double)((BasicLattice2D const *)arg1)->length2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56290,7 +66200,17 @@ SWIGINTERN PyObject *_wrap_BasicLattice2D_latticeAngle(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicLattice2D_latticeAngle" "', argument " "1"" of type '" "BasicLattice2D const *""'"); } arg1 = reinterpret_cast< BasicLattice2D * >(argp1); - result = (double)((BasicLattice2D const *)arg1)->latticeAngle(); + { + try { + result = (double)((BasicLattice2D const *)arg1)->latticeAngle(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56313,7 +66233,17 @@ SWIGINTERN PyObject *_wrap_BasicLattice2D_unitCellArea(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicLattice2D_unitCellArea" "', argument " "1"" of type '" "BasicLattice2D const *""'"); } arg1 = reinterpret_cast< BasicLattice2D * >(argp1); - result = (double)((BasicLattice2D const *)arg1)->unitCellArea(); + { + try { + result = (double)((BasicLattice2D const *)arg1)->unitCellArea(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56336,7 +66266,17 @@ SWIGINTERN PyObject *_wrap_BasicLattice2D_validate(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicLattice2D_validate" "', argument " "1"" of type '" "BasicLattice2D const *""'"); } arg1 = reinterpret_cast< BasicLattice2D * >(argp1); - result = ((BasicLattice2D const *)arg1)->validate(); + { + try { + result = ((BasicLattice2D const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -56358,7 +66298,17 @@ SWIGINTERN PyObject *_wrap_delete_BasicLattice2D(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BasicLattice2D" "', argument " "1"" of type '" "BasicLattice2D *""'"); } arg1 = reinterpret_cast< BasicLattice2D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -56398,7 +66348,17 @@ SWIGINTERN PyObject *_wrap_new_SquareLattice2D__SWIG_0(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SquareLattice2D" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (SquareLattice2D *)new SquareLattice2D(arg1,arg2); + { + try { + result = (SquareLattice2D *)new SquareLattice2D(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SquareLattice2D, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -56419,7 +66379,17 @@ SWIGINTERN PyObject *_wrap_new_SquareLattice2D__SWIG_1(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SquareLattice2D" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (SquareLattice2D *)new SquareLattice2D(arg1); + { + try { + result = (SquareLattice2D *)new SquareLattice2D(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SquareLattice2D, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -56486,7 +66456,17 @@ SWIGINTERN PyObject *_wrap_SquareLattice2D_clone(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SquareLattice2D_clone" "', argument " "1"" of type '" "SquareLattice2D const *""'"); } arg1 = reinterpret_cast< SquareLattice2D * >(argp1); - result = (SquareLattice2D *)((SquareLattice2D const *)arg1)->clone(); + { + try { + result = (SquareLattice2D *)((SquareLattice2D const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SquareLattice2D, 0 | 0 ); return resultobj; fail: @@ -56509,7 +66489,17 @@ SWIGINTERN PyObject *_wrap_SquareLattice2D_className(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SquareLattice2D_className" "', argument " "1"" of type '" "SquareLattice2D const *""'"); } arg1 = reinterpret_cast< SquareLattice2D * >(argp1); - result = ((SquareLattice2D const *)arg1)->className(); + { + try { + result = ((SquareLattice2D const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -56532,7 +66522,17 @@ SWIGINTERN PyObject *_wrap_SquareLattice2D_parDefs(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SquareLattice2D_parDefs" "', argument " "1"" of type '" "SquareLattice2D const *""'"); } arg1 = reinterpret_cast< SquareLattice2D * >(argp1); - result = ((SquareLattice2D const *)arg1)->parDefs(); + { + try { + result = ((SquareLattice2D const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -56555,7 +66555,17 @@ SWIGINTERN PyObject *_wrap_SquareLattice2D_length1(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SquareLattice2D_length1" "', argument " "1"" of type '" "SquareLattice2D const *""'"); } arg1 = reinterpret_cast< SquareLattice2D * >(argp1); - result = (double)((SquareLattice2D const *)arg1)->length1(); + { + try { + result = (double)((SquareLattice2D const *)arg1)->length1(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56578,7 +66588,17 @@ SWIGINTERN PyObject *_wrap_SquareLattice2D_length2(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SquareLattice2D_length2" "', argument " "1"" of type '" "SquareLattice2D const *""'"); } arg1 = reinterpret_cast< SquareLattice2D * >(argp1); - result = (double)((SquareLattice2D const *)arg1)->length2(); + { + try { + result = (double)((SquareLattice2D const *)arg1)->length2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56601,7 +66621,17 @@ SWIGINTERN PyObject *_wrap_SquareLattice2D_latticeAngle(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SquareLattice2D_latticeAngle" "', argument " "1"" of type '" "SquareLattice2D const *""'"); } arg1 = reinterpret_cast< SquareLattice2D * >(argp1); - result = (double)((SquareLattice2D const *)arg1)->latticeAngle(); + { + try { + result = (double)((SquareLattice2D const *)arg1)->latticeAngle(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56624,7 +66654,17 @@ SWIGINTERN PyObject *_wrap_SquareLattice2D_unitCellArea(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SquareLattice2D_unitCellArea" "', argument " "1"" of type '" "SquareLattice2D const *""'"); } arg1 = reinterpret_cast< SquareLattice2D * >(argp1); - result = (double)((SquareLattice2D const *)arg1)->unitCellArea(); + { + try { + result = (double)((SquareLattice2D const *)arg1)->unitCellArea(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56647,7 +66687,17 @@ SWIGINTERN PyObject *_wrap_SquareLattice2D_validate(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SquareLattice2D_validate" "', argument " "1"" of type '" "SquareLattice2D const *""'"); } arg1 = reinterpret_cast< SquareLattice2D * >(argp1); - result = ((SquareLattice2D const *)arg1)->validate(); + { + try { + result = ((SquareLattice2D const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -56669,7 +66719,17 @@ SWIGINTERN PyObject *_wrap_delete_SquareLattice2D(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SquareLattice2D" "', argument " "1"" of type '" "SquareLattice2D *""'"); } arg1 = reinterpret_cast< SquareLattice2D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -56710,7 +66770,17 @@ SWIGINTERN PyObject *_wrap_new_HexagonalLattice2D(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HexagonalLattice2D" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (HexagonalLattice2D *)new HexagonalLattice2D(arg1,arg2); + { + try { + result = (HexagonalLattice2D *)new HexagonalLattice2D(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HexagonalLattice2D, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -56733,7 +66803,17 @@ SWIGINTERN PyObject *_wrap_HexagonalLattice2D_clone(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HexagonalLattice2D_clone" "', argument " "1"" of type '" "HexagonalLattice2D const *""'"); } arg1 = reinterpret_cast< HexagonalLattice2D * >(argp1); - result = (HexagonalLattice2D *)((HexagonalLattice2D const *)arg1)->clone(); + { + try { + result = (HexagonalLattice2D *)((HexagonalLattice2D const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HexagonalLattice2D, 0 | 0 ); return resultobj; fail: @@ -56756,7 +66836,17 @@ SWIGINTERN PyObject *_wrap_HexagonalLattice2D_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HexagonalLattice2D_className" "', argument " "1"" of type '" "HexagonalLattice2D const *""'"); } arg1 = reinterpret_cast< HexagonalLattice2D * >(argp1); - result = ((HexagonalLattice2D const *)arg1)->className(); + { + try { + result = ((HexagonalLattice2D const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -56779,7 +66869,17 @@ SWIGINTERN PyObject *_wrap_HexagonalLattice2D_parDefs(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HexagonalLattice2D_parDefs" "', argument " "1"" of type '" "HexagonalLattice2D const *""'"); } arg1 = reinterpret_cast< HexagonalLattice2D * >(argp1); - result = ((HexagonalLattice2D const *)arg1)->parDefs(); + { + try { + result = ((HexagonalLattice2D const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -56802,7 +66902,17 @@ SWIGINTERN PyObject *_wrap_HexagonalLattice2D_length1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HexagonalLattice2D_length1" "', argument " "1"" of type '" "HexagonalLattice2D const *""'"); } arg1 = reinterpret_cast< HexagonalLattice2D * >(argp1); - result = (double)((HexagonalLattice2D const *)arg1)->length1(); + { + try { + result = (double)((HexagonalLattice2D const *)arg1)->length1(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56825,7 +66935,17 @@ SWIGINTERN PyObject *_wrap_HexagonalLattice2D_length2(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HexagonalLattice2D_length2" "', argument " "1"" of type '" "HexagonalLattice2D const *""'"); } arg1 = reinterpret_cast< HexagonalLattice2D * >(argp1); - result = (double)((HexagonalLattice2D const *)arg1)->length2(); + { + try { + result = (double)((HexagonalLattice2D const *)arg1)->length2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56848,7 +66968,17 @@ SWIGINTERN PyObject *_wrap_HexagonalLattice2D_latticeAngle(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HexagonalLattice2D_latticeAngle" "', argument " "1"" of type '" "HexagonalLattice2D const *""'"); } arg1 = reinterpret_cast< HexagonalLattice2D * >(argp1); - result = (double)((HexagonalLattice2D const *)arg1)->latticeAngle(); + { + try { + result = (double)((HexagonalLattice2D const *)arg1)->latticeAngle(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56871,7 +67001,17 @@ SWIGINTERN PyObject *_wrap_HexagonalLattice2D_unitCellArea(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HexagonalLattice2D_unitCellArea" "', argument " "1"" of type '" "HexagonalLattice2D const *""'"); } arg1 = reinterpret_cast< HexagonalLattice2D * >(argp1); - result = (double)((HexagonalLattice2D const *)arg1)->unitCellArea(); + { + try { + result = (double)((HexagonalLattice2D const *)arg1)->unitCellArea(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -56894,7 +67034,17 @@ SWIGINTERN PyObject *_wrap_HexagonalLattice2D_validate(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HexagonalLattice2D_validate" "', argument " "1"" of type '" "HexagonalLattice2D const *""'"); } arg1 = reinterpret_cast< HexagonalLattice2D * >(argp1); - result = ((HexagonalLattice2D const *)arg1)->validate(); + { + try { + result = ((HexagonalLattice2D const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -56916,7 +67066,17 @@ SWIGINTERN PyObject *_wrap_delete_HexagonalLattice2D(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HexagonalLattice2D" "', argument " "1"" of type '" "HexagonalLattice2D *""'"); } arg1 = reinterpret_cast< HexagonalLattice2D * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -56950,7 +67110,17 @@ SWIGINTERN PyObject *_wrap_CubicLattice(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CubicLattice" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = bake::CubicLattice(arg1); + { + try { + result = bake::CubicLattice(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Lattice3D(result)), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -56973,7 +67143,17 @@ SWIGINTERN PyObject *_wrap_FCCLattice(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "FCCLattice" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = bake::FCCLattice(arg1); + { + try { + result = bake::FCCLattice(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Lattice3D(result)), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -57003,7 +67183,17 @@ SWIGINTERN PyObject *_wrap_HexagonalLattice(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HexagonalLattice" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = bake::HexagonalLattice(arg1,arg2); + { + try { + result = bake::HexagonalLattice(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Lattice3D(result)), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -57033,7 +67223,17 @@ SWIGINTERN PyObject *_wrap_HCPLattice(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HCPLattice" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = bake::HCPLattice(arg1,arg2); + { + try { + result = bake::HCPLattice(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Lattice3D(result)), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -57063,7 +67263,17 @@ SWIGINTERN PyObject *_wrap_TetragonalLattice(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TetragonalLattice" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = bake::TetragonalLattice(arg1,arg2); + { + try { + result = bake::TetragonalLattice(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Lattice3D(result)), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -57093,7 +67303,17 @@ SWIGINTERN PyObject *_wrap_BCTLattice(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BCTLattice" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = bake::BCTLattice(arg1,arg2); + { + try { + result = bake::BCTLattice(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Lattice3D(result)), SWIGTYPE_p_Lattice3D, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -57135,15 +67355,15 @@ static PyMethodDef SwigMethods[] = { { "vdouble1d_t___delslice__", _wrap_vdouble1d_t___delslice__, METH_VARARGS, "vdouble1d_t___delslice__(vdouble1d_t self, std::vector< double >::difference_type i, std::vector< double >::difference_type j)"}, { "vdouble1d_t___delitem__", _wrap_vdouble1d_t___delitem__, METH_VARARGS, "\n" "vdouble1d_t___delitem__(vdouble1d_t self, std::vector< double >::difference_type i)\n" - "vdouble1d_t___delitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble1d_t___delitem__(vdouble1d_t self, PySliceObject * slice)\n" ""}, { "vdouble1d_t___getitem__", _wrap_vdouble1d_t___getitem__, METH_VARARGS, "\n" - "vdouble1d_t___getitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble1d_t\n" + "vdouble1d_t___getitem__(vdouble1d_t self, PySliceObject * slice) -> vdouble1d_t\n" "vdouble1d_t___getitem__(vdouble1d_t self, std::vector< double >::difference_type i) -> std::vector< double >::value_type const &\n" ""}, { "vdouble1d_t___setitem__", _wrap_vdouble1d_t___setitem__, METH_VARARGS, "\n" - "vdouble1d_t___setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice, vdouble1d_t v)\n" - "vdouble1d_t___setitem__(vdouble1d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble1d_t___setitem__(vdouble1d_t self, PySliceObject * slice, vdouble1d_t v)\n" + "vdouble1d_t___setitem__(vdouble1d_t self, PySliceObject * slice)\n" "vdouble1d_t___setitem__(vdouble1d_t self, std::vector< double >::difference_type i, std::vector< double >::value_type const & x)\n" ""}, { "vdouble1d_t_pop", _wrap_vdouble1d_t_pop, METH_O, "vdouble1d_t_pop(vdouble1d_t self) -> std::vector< double >::value_type"}, @@ -57197,15 +67417,15 @@ static PyMethodDef SwigMethods[] = { { "vdouble2d_t___delslice__", _wrap_vdouble2d_t___delslice__, METH_VARARGS, "vdouble2d_t___delslice__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::difference_type j)"}, { "vdouble2d_t___delitem__", _wrap_vdouble2d_t___delitem__, METH_VARARGS, "\n" "vdouble2d_t___delitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i)\n" - "vdouble2d_t___delitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble2d_t___delitem__(vdouble2d_t self, PySliceObject * slice)\n" ""}, { "vdouble2d_t___getitem__", _wrap_vdouble2d_t___getitem__, METH_VARARGS, "\n" - "vdouble2d_t___getitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice) -> vdouble2d_t\n" + "vdouble2d_t___getitem__(vdouble2d_t self, PySliceObject * slice) -> vdouble2d_t\n" "vdouble2d_t___getitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i) -> vdouble1d_t\n" ""}, { "vdouble2d_t___setitem__", _wrap_vdouble2d_t___setitem__, METH_VARARGS, "\n" - "vdouble2d_t___setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice, vdouble2d_t v)\n" - "vdouble2d_t___setitem__(vdouble2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vdouble2d_t___setitem__(vdouble2d_t self, PySliceObject * slice, vdouble2d_t v)\n" + "vdouble2d_t___setitem__(vdouble2d_t self, PySliceObject * slice)\n" "vdouble2d_t___setitem__(vdouble2d_t self, std::vector< std::vector< double > >::difference_type i, vdouble1d_t x)\n" ""}, { "vdouble2d_t_pop", _wrap_vdouble2d_t_pop, METH_O, "vdouble2d_t_pop(vdouble2d_t self) -> vdouble1d_t"}, @@ -57259,15 +67479,15 @@ static PyMethodDef SwigMethods[] = { { "vector_integer_t___delslice__", _wrap_vector_integer_t___delslice__, METH_VARARGS, "vector_integer_t___delslice__(vector_integer_t self, std::vector< int >::difference_type i, std::vector< int >::difference_type j)"}, { "vector_integer_t___delitem__", _wrap_vector_integer_t___delitem__, METH_VARARGS, "\n" "vector_integer_t___delitem__(vector_integer_t self, std::vector< int >::difference_type i)\n" - "vector_integer_t___delitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_integer_t___delitem__(vector_integer_t self, PySliceObject * slice)\n" ""}, { "vector_integer_t___getitem__", _wrap_vector_integer_t___getitem__, METH_VARARGS, "\n" - "vector_integer_t___getitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice) -> vector_integer_t\n" + "vector_integer_t___getitem__(vector_integer_t self, PySliceObject * slice) -> vector_integer_t\n" "vector_integer_t___getitem__(vector_integer_t self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const &\n" ""}, { "vector_integer_t___setitem__", _wrap_vector_integer_t___setitem__, METH_VARARGS, "\n" - "vector_integer_t___setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice, vector_integer_t v)\n" - "vector_integer_t___setitem__(vector_integer_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_integer_t___setitem__(vector_integer_t self, PySliceObject * slice, vector_integer_t v)\n" + "vector_integer_t___setitem__(vector_integer_t self, PySliceObject * slice)\n" "vector_integer_t___setitem__(vector_integer_t self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x)\n" ""}, { "vector_integer_t_pop", _wrap_vector_integer_t_pop, METH_O, "vector_integer_t_pop(vector_integer_t self) -> std::vector< int >::value_type"}, @@ -57321,15 +67541,15 @@ static PyMethodDef SwigMethods[] = { { "vinteger2d_t___delslice__", _wrap_vinteger2d_t___delslice__, METH_VARARGS, "vinteger2d_t___delslice__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i, std::vector< std::vector< int > >::difference_type j)"}, { "vinteger2d_t___delitem__", _wrap_vinteger2d_t___delitem__, METH_VARARGS, "\n" "vinteger2d_t___delitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i)\n" - "vinteger2d_t___delitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vinteger2d_t___delitem__(vinteger2d_t self, PySliceObject * slice)\n" ""}, { "vinteger2d_t___getitem__", _wrap_vinteger2d_t___getitem__, METH_VARARGS, "\n" - "vinteger2d_t___getitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice) -> vinteger2d_t\n" + "vinteger2d_t___getitem__(vinteger2d_t self, PySliceObject * slice) -> vinteger2d_t\n" "vinteger2d_t___getitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i) -> vector_integer_t\n" ""}, { "vinteger2d_t___setitem__", _wrap_vinteger2d_t___setitem__, METH_VARARGS, "\n" - "vinteger2d_t___setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice, vinteger2d_t v)\n" - "vinteger2d_t___setitem__(vinteger2d_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vinteger2d_t___setitem__(vinteger2d_t self, PySliceObject * slice, vinteger2d_t v)\n" + "vinteger2d_t___setitem__(vinteger2d_t self, PySliceObject * slice)\n" "vinteger2d_t___setitem__(vinteger2d_t self, std::vector< std::vector< int > >::difference_type i, vector_integer_t x)\n" ""}, { "vinteger2d_t_pop", _wrap_vinteger2d_t_pop, METH_O, "vinteger2d_t_pop(vinteger2d_t self) -> vector_integer_t"}, @@ -57383,15 +67603,15 @@ static PyMethodDef SwigMethods[] = { { "vector_longinteger_t___delslice__", _wrap_vector_longinteger_t___delslice__, METH_VARARGS, "vector_longinteger_t___delslice__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i, std::vector< unsigned long >::difference_type j)"}, { "vector_longinteger_t___delitem__", _wrap_vector_longinteger_t___delitem__, METH_VARARGS, "\n" "vector_longinteger_t___delitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i)\n" - "vector_longinteger_t___delitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_longinteger_t___delitem__(vector_longinteger_t self, PySliceObject * slice)\n" ""}, { "vector_longinteger_t___getitem__", _wrap_vector_longinteger_t___getitem__, METH_VARARGS, "\n" - "vector_longinteger_t___getitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice) -> vector_longinteger_t\n" + "vector_longinteger_t___getitem__(vector_longinteger_t self, PySliceObject * slice) -> vector_longinteger_t\n" "vector_longinteger_t___getitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i) -> std::vector< unsigned long >::value_type const &\n" ""}, { "vector_longinteger_t___setitem__", _wrap_vector_longinteger_t___setitem__, METH_VARARGS, "\n" - "vector_longinteger_t___setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice, vector_longinteger_t v)\n" - "vector_longinteger_t___setitem__(vector_longinteger_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_longinteger_t___setitem__(vector_longinteger_t self, PySliceObject * slice, vector_longinteger_t v)\n" + "vector_longinteger_t___setitem__(vector_longinteger_t self, PySliceObject * slice)\n" "vector_longinteger_t___setitem__(vector_longinteger_t self, std::vector< unsigned long >::difference_type i, std::vector< unsigned long >::value_type const & x)\n" ""}, { "vector_longinteger_t_pop", _wrap_vector_longinteger_t_pop, METH_O, "vector_longinteger_t_pop(vector_longinteger_t self) -> std::vector< unsigned long >::value_type"}, @@ -57445,15 +67665,15 @@ static PyMethodDef SwigMethods[] = { { "vector_complex_t___delslice__", _wrap_vector_complex_t___delslice__, METH_VARARGS, "vector_complex_t___delslice__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i, std::vector< std::complex< double > >::difference_type j)"}, { "vector_complex_t___delitem__", _wrap_vector_complex_t___delitem__, METH_VARARGS, "\n" "vector_complex_t___delitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i)\n" - "vector_complex_t___delitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_complex_t___delitem__(vector_complex_t self, PySliceObject * slice)\n" ""}, { "vector_complex_t___getitem__", _wrap_vector_complex_t___getitem__, METH_VARARGS, "\n" - "vector_complex_t___getitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice) -> vector_complex_t\n" + "vector_complex_t___getitem__(vector_complex_t self, PySliceObject * slice) -> vector_complex_t\n" "vector_complex_t___getitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i) -> std::vector< std::complex< double > >::value_type const &\n" ""}, { "vector_complex_t___setitem__", _wrap_vector_complex_t___setitem__, METH_VARARGS, "\n" - "vector_complex_t___setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice, vector_complex_t v)\n" - "vector_complex_t___setitem__(vector_complex_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_complex_t___setitem__(vector_complex_t self, PySliceObject * slice, vector_complex_t v)\n" + "vector_complex_t___setitem__(vector_complex_t self, PySliceObject * slice)\n" "vector_complex_t___setitem__(vector_complex_t self, std::vector< std::complex< double > >::difference_type i, std::vector< std::complex< double > >::value_type const & x)\n" ""}, { "vector_complex_t_pop", _wrap_vector_complex_t_pop, METH_O, "vector_complex_t_pop(vector_complex_t self) -> std::vector< std::complex< double > >::value_type"}, @@ -57507,15 +67727,15 @@ static PyMethodDef SwigMethods[] = { { "vector_string_t___delslice__", _wrap_vector_string_t___delslice__, METH_VARARGS, "vector_string_t___delslice__(vector_string_t self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j)"}, { "vector_string_t___delitem__", _wrap_vector_string_t___delitem__, METH_VARARGS, "\n" "vector_string_t___delitem__(vector_string_t self, std::vector< std::string >::difference_type i)\n" - "vector_string_t___delitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_string_t___delitem__(vector_string_t self, PySliceObject * slice)\n" ""}, { "vector_string_t___getitem__", _wrap_vector_string_t___getitem__, METH_VARARGS, "\n" - "vector_string_t___getitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice) -> vector_string_t\n" + "vector_string_t___getitem__(vector_string_t self, PySliceObject * slice) -> vector_string_t\n" "vector_string_t___getitem__(vector_string_t self, std::vector< std::string >::difference_type i) -> std::vector< std::string >::value_type const &\n" ""}, { "vector_string_t___setitem__", _wrap_vector_string_t___setitem__, METH_VARARGS, "\n" - "vector_string_t___setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice, vector_string_t v)\n" - "vector_string_t___setitem__(vector_string_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_string_t___setitem__(vector_string_t self, PySliceObject * slice, vector_string_t v)\n" + "vector_string_t___setitem__(vector_string_t self, PySliceObject * slice)\n" "vector_string_t___setitem__(vector_string_t self, std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const & x)\n" ""}, { "vector_string_t_pop", _wrap_vector_string_t_pop, METH_O, "vector_string_t_pop(vector_string_t self) -> std::vector< std::string >::value_type"}, @@ -57625,15 +67845,15 @@ static PyMethodDef SwigMethods[] = { { "vector_pvacuum_double_t___delslice__", _wrap_vector_pvacuum_double_t___delslice__, METH_VARARGS, "vector_pvacuum_double_t___delslice__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i, std::vector< std::pair< double,double > >::difference_type j)"}, { "vector_pvacuum_double_t___delitem__", _wrap_vector_pvacuum_double_t___delitem__, METH_VARARGS, "\n" "vector_pvacuum_double_t___delitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i)\n" - "vector_pvacuum_double_t___delitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_pvacuum_double_t___delitem__(vector_pvacuum_double_t self, PySliceObject * slice)\n" ""}, { "vector_pvacuum_double_t___getitem__", _wrap_vector_pvacuum_double_t___getitem__, METH_VARARGS, "\n" - "vector_pvacuum_double_t___getitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice) -> vector_pvacuum_double_t\n" + "vector_pvacuum_double_t___getitem__(vector_pvacuum_double_t self, PySliceObject * slice) -> vector_pvacuum_double_t\n" "vector_pvacuum_double_t___getitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i) -> pvacuum_double_t\n" ""}, { "vector_pvacuum_double_t___setitem__", _wrap_vector_pvacuum_double_t___setitem__, METH_VARARGS, "\n" - "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice, vector_pvacuum_double_t v)\n" - "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, PySliceObject * slice, vector_pvacuum_double_t v)\n" + "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, PySliceObject * slice)\n" "vector_pvacuum_double_t___setitem__(vector_pvacuum_double_t self, std::vector< std::pair< double,double > >::difference_type i, pvacuum_double_t x)\n" ""}, { "vector_pvacuum_double_t_pop", _wrap_vector_pvacuum_double_t_pop, METH_O, "vector_pvacuum_double_t_pop(vector_pvacuum_double_t self) -> pvacuum_double_t"}, @@ -57743,15 +67963,15 @@ static PyMethodDef SwigMethods[] = { { "vector_R3___delslice__", _wrap_vector_R3___delslice__, METH_VARARGS, "vector_R3___delslice__(vector_R3 self, std::vector< Vec3< double > >::difference_type i, std::vector< Vec3< double > >::difference_type j)"}, { "vector_R3___delitem__", _wrap_vector_R3___delitem__, METH_VARARGS, "\n" "vector_R3___delitem__(vector_R3 self, std::vector< Vec3< double > >::difference_type i)\n" - "vector_R3___delitem__(vector_R3 self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_R3___delitem__(vector_R3 self, PySliceObject * slice)\n" ""}, { "vector_R3___getitem__", _wrap_vector_R3___getitem__, METH_VARARGS, "\n" - "vector_R3___getitem__(vector_R3 self, SWIGPY_SLICEOBJECT * slice) -> vector_R3\n" + "vector_R3___getitem__(vector_R3 self, PySliceObject * slice) -> vector_R3\n" "vector_R3___getitem__(vector_R3 self, std::vector< Vec3< double > >::difference_type i) -> R3\n" ""}, { "vector_R3___setitem__", _wrap_vector_R3___setitem__, METH_VARARGS, "\n" - "vector_R3___setitem__(vector_R3 self, SWIGPY_SLICEOBJECT * slice, vector_R3 v)\n" - "vector_R3___setitem__(vector_R3 self, SWIGPY_SLICEOBJECT * slice)\n" + "vector_R3___setitem__(vector_R3 self, PySliceObject * slice, vector_R3 v)\n" + "vector_R3___setitem__(vector_R3 self, PySliceObject * slice)\n" "vector_R3___setitem__(vector_R3 self, std::vector< Vec3< double > >::difference_type i, R3 x)\n" ""}, { "vector_R3_pop", _wrap_vector_R3_pop, METH_O, "vector_R3_pop(vector_R3 self) -> R3"}, @@ -57805,15 +68025,15 @@ static PyMethodDef SwigMethods[] = { { "swig_dummy_type_const_inode_vector___delslice__", _wrap_swig_dummy_type_const_inode_vector___delslice__, METH_VARARGS, "swig_dummy_type_const_inode_vector___delslice__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i, std::vector< INode const * >::difference_type j)"}, { "swig_dummy_type_const_inode_vector___delitem__", _wrap_swig_dummy_type_const_inode_vector___delitem__, METH_VARARGS, "\n" "swig_dummy_type_const_inode_vector___delitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i)\n" - "swig_dummy_type_const_inode_vector___delitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice)\n" + "swig_dummy_type_const_inode_vector___delitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice)\n" ""}, { "swig_dummy_type_const_inode_vector___getitem__", _wrap_swig_dummy_type_const_inode_vector___getitem__, METH_VARARGS, "\n" - "swig_dummy_type_const_inode_vector___getitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice) -> swig_dummy_type_const_inode_vector\n" + "swig_dummy_type_const_inode_vector___getitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice) -> swig_dummy_type_const_inode_vector\n" "swig_dummy_type_const_inode_vector___getitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i) -> INode\n" ""}, { "swig_dummy_type_const_inode_vector___setitem__", _wrap_swig_dummy_type_const_inode_vector___setitem__, METH_VARARGS, "\n" - "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice, swig_dummy_type_const_inode_vector v)\n" - "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, SWIGPY_SLICEOBJECT * slice)\n" + "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice, swig_dummy_type_const_inode_vector v)\n" + "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, PySliceObject * slice)\n" "swig_dummy_type_const_inode_vector___setitem__(swig_dummy_type_const_inode_vector self, std::vector< INode const * >::difference_type i, INode x)\n" ""}, { "swig_dummy_type_const_inode_vector_pop", _wrap_swig_dummy_type_const_inode_vector_pop, METH_O, "swig_dummy_type_const_inode_vector_pop(swig_dummy_type_const_inode_vector self) -> INode"}, diff --git a/auto/Wrap/libBornAgainSim_wrap.cpp b/auto/Wrap/libBornAgainSim_wrap.cpp index 3bc782622b103b6733f0819bb2471920f16d233d..55b5f72a38b79b9f4c20813aa97a07f311d0a764 100644 --- a/auto/Wrap/libBornAgainSim_wrap.cpp +++ b/auto/Wrap/libBornAgainSim_wrap.cpp @@ -10078,7 +10078,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble1d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble1d_t" "', argument " "1"" of type '" "std::vector< double > *""'"); } arg1 = reinterpret_cast< std::vector< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -11932,7 +11942,17 @@ SWIGINTERN PyObject *_wrap_delete_vdouble2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vdouble2d_t" "', argument " "1"" of type '" "std::vector< std::vector< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -13756,7 +13776,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_integer_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_integer_t" "', argument " "1"" of type '" "std::vector< int > *""'"); } arg1 = reinterpret_cast< std::vector< int > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -15610,7 +15640,17 @@ SWIGINTERN PyObject *_wrap_delete_vinteger2d_t(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vinteger2d_t" "', argument " "1"" of type '" "std::vector< std::vector< int > > *""'"); } arg1 = reinterpret_cast< std::vector< std::vector< int > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -17434,7 +17474,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_longinteger_t(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_longinteger_t" "', argument " "1"" of type '" "std::vector< unsigned long > *""'"); } arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -19258,7 +19308,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_complex_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_complex_t" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -21112,7 +21172,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_string_t(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_string_t" "', argument " "1"" of type '" "std::vector< std::string > *""'"); } arg1 = reinterpret_cast< std::vector< std::string > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22321,7 +22391,17 @@ SWIGINTERN PyObject *_wrap_delete_map_string_double_t(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_string_double_t" "', argument " "1"" of type '" "std::map< std::string,double > *""'"); } arg1 = reinterpret_cast< std::map< std::string,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -22574,7 +22654,17 @@ SWIGINTERN PyObject *_wrap_delete_pvacuum_double_t(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pvacuum_double_t" "', argument " "1"" of type '" "std::pair< double,double > *""'"); } arg1 = reinterpret_cast< std::pair< double,double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24428,7 +24518,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_pvacuum_double_t(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_pvacuum_double_t" "', argument " "1"" of type '" "std::vector< std::pair< double,double > > *""'"); } arg1 = reinterpret_cast< std::vector< std::pair< double,double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24476,7 +24576,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_R3" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + { + try { + result = (Vec3< double > *)new Vec3< double >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24489,7 +24599,17 @@ SWIGINTERN PyObject *_wrap_new_R3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< double > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< double > *)new Vec3< double >(); + { + try { + result = (Vec3< double > *)new Vec3< double >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -24555,7 +24675,17 @@ SWIGINTERN PyObject *_wrap_R3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_x" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->x(); + { + try { + result = (double)((Vec3< double > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24578,7 +24708,17 @@ SWIGINTERN PyObject *_wrap_R3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_y" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->y(); + { + try { + result = (double)((Vec3< double > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24601,7 +24741,17 @@ SWIGINTERN PyObject *_wrap_R3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_z" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->z(); + { + try { + result = (double)((Vec3< double > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24632,7 +24782,17 @@ SWIGINTERN PyObject *_wrap_R3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setX((double const &)*arg2); + { + try { + (arg1)->setX((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24663,7 +24823,17 @@ SWIGINTERN PyObject *_wrap_R3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setY((double const &)*arg2); + { + try { + (arg1)->setY((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24694,7 +24864,17 @@ SWIGINTERN PyObject *_wrap_R3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< double >(val2); arg2 = &temp2; - (arg1)->setZ((double const &)*arg2); + { + try { + (arg1)->setZ((double const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -24727,7 +24907,17 @@ SWIGINTERN PyObject *_wrap_R3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___iadd__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator +=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24760,7 +24950,17 @@ SWIGINTERN PyObject *_wrap_R3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___isub__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + { + try { + result = (Vec3< double > *) &(arg1)->operator -=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24783,7 +24983,17 @@ SWIGINTERN PyObject *_wrap_R3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_conj" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->conj(); + { + try { + result = ((Vec3< double > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24806,7 +25016,17 @@ SWIGINTERN PyObject *_wrap_R3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24829,7 +25049,17 @@ SWIGINTERN PyObject *_wrap_R3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_mag" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< double > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24852,7 +25082,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy2" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24875,7 +25115,17 @@ SWIGINTERN PyObject *_wrap_R3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_magxy" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = (double)((Vec3< double > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< double > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -24898,7 +25148,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_throw" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24921,7 +25181,17 @@ SWIGINTERN PyObject *_wrap_R3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_unit_or_null" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< double > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24944,7 +25214,17 @@ SWIGINTERN PyObject *_wrap_R3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_complex" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->complex(); + { + try { + result = ((Vec3< double > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -24967,7 +25247,17 @@ SWIGINTERN PyObject *_wrap_R3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3_real" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = ((Vec3< double > const *)arg1)->real(); + { + try { + result = ((Vec3< double > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25000,7 +25290,17 @@ SWIGINTERN PyObject *_wrap_R3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___eq__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator ==((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25035,7 +25335,17 @@ SWIGINTERN PyObject *_wrap_R3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___ne__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + { + try { + result = (bool)((Vec3< double > const *)arg1)->operator !=((Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25067,7 +25377,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25097,7 +25417,17 @@ SWIGINTERN PyObject *_wrap_R3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< double > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25130,7 +25460,17 @@ SWIGINTERN PyObject *_wrap_R3___add__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___add__" "', argument " "2"" of type '" "Vec3< double > const &""'"); } arg2 = reinterpret_cast< Vec3< double > * >(argp2); - result = Vec3_Sl_double_Sg____add__((Vec3< double > const *)arg1,(Vec3< double > const &)*arg2); + { + try { + result = Vec3_Sl_double_Sg____add__((Vec3< double > const *)arg1,(Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25162,7 +25502,17 @@ SWIGINTERN PyObject *_wrap_R3___mul__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3___mul__" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = Vec3_Sl_double_Sg____mul__((Vec3< double > const *)arg1,arg2); + { + try { + result = Vec3_Sl_double_Sg____mul__((Vec3< double > const *)arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25194,7 +25544,17 @@ SWIGINTERN PyObject *_wrap_R3___rmul__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3___rmul__" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = Vec3_Sl_double_Sg____rmul__((Vec3< double > const *)arg1,arg2); + { + try { + result = Vec3_Sl_double_Sg____rmul__((Vec3< double > const *)arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25219,7 +25579,17 @@ SWIGINTERN PyObject *_wrap_R3___neg__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3___neg__" "', argument " "1"" of type '" "Vec3< double > const *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - result = Vec3_Sl_double_Sg____neg__((Vec3< double > const *)arg1); + { + try { + result = Vec3_Sl_double_Sg____neg__((Vec3< double > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< double >(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25243,7 +25613,17 @@ SWIGINTERN PyObject *_wrap_delete_R3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_R3" "', argument " "1"" of type '" "Vec3< double > *""'"); } arg1 = reinterpret_cast< Vec3< double > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25291,7 +25671,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_C3" "', argument " "3"" of type '" "std::complex< double >""'"); } arg3 = static_cast< std::complex< double > >(val3); - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25304,7 +25694,17 @@ SWIGINTERN PyObject *_wrap_new_C3__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyOb Vec3< std::complex< double > > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + { + try { + result = (Vec3< std::complex< double > > *)new Vec3< std::complex< double > >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -25370,7 +25770,17 @@ SWIGINTERN PyObject *_wrap_C3_x(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_x" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->x(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->x(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25393,7 +25803,17 @@ SWIGINTERN PyObject *_wrap_C3_y(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_y" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->y(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->y(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25416,7 +25836,17 @@ SWIGINTERN PyObject *_wrap_C3_z(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_z" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->z(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->z(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result)); return resultobj; fail: @@ -25447,7 +25877,17 @@ SWIGINTERN PyObject *_wrap_C3_setX(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setX((std::complex< double > const &)*arg2); + { + try { + (arg1)->setX((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25478,7 +25918,17 @@ SWIGINTERN PyObject *_wrap_C3_setY(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setY((std::complex< double > const &)*arg2); + { + try { + (arg1)->setY((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25509,7 +25959,17 @@ SWIGINTERN PyObject *_wrap_C3_setZ(PyObject *self, PyObject *args) { } temp2 = static_cast< std::complex< double > >(val2); arg2 = &temp2; - (arg1)->setZ((std::complex< double > const &)*arg2); + { + try { + (arg1)->setZ((std::complex< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25542,7 +26002,17 @@ SWIGINTERN PyObject *_wrap_C3___iadd__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___iadd__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator +=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25575,7 +26045,17 @@ SWIGINTERN PyObject *_wrap_C3___isub__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___isub__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (Vec3< std::complex< double > > *) &(arg1)->operator -=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25598,7 +26078,17 @@ SWIGINTERN PyObject *_wrap_C3_conj(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_conj" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->conj(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25621,7 +26111,17 @@ SWIGINTERN PyObject *_wrap_C3_mag2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25644,7 +26144,17 @@ SWIGINTERN PyObject *_wrap_C3_mag(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_mag" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->mag(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25667,7 +26177,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy2" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25690,7 +26210,17 @@ SWIGINTERN PyObject *_wrap_C3_magxy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_magxy" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + { + try { + result = (double)((Vec3< std::complex< double > > const *)arg1)->magxy(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25713,7 +26243,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_throw(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_throw" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_throw(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25736,7 +26276,17 @@ SWIGINTERN PyObject *_wrap_C3_unit_or_null(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_unit_or_null" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->unit_or_null(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25759,7 +26309,17 @@ SWIGINTERN PyObject *_wrap_C3_complex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_complex" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->complex(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new C3(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25782,7 +26342,17 @@ SWIGINTERN PyObject *_wrap_C3_real(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "C3_real" "', argument " "1"" of type '" "Vec3< std::complex< double > > const *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - result = ((Vec3< std::complex< double > > const *)arg1)->real(); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->real(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25815,7 +26385,17 @@ SWIGINTERN PyObject *_wrap_C3___eq__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___eq__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator ==((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25850,7 +26430,17 @@ SWIGINTERN PyObject *_wrap_C3___ne__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "C3___ne__" "', argument " "2"" of type '" "Vec3< std::complex< double > > const &""'"); } arg2 = reinterpret_cast< Vec3< std::complex< double > > * >(argp2); - result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + { + try { + result = (bool)((Vec3< std::complex< double > > const *)arg1)->operator !=((Vec3< std::complex< double > > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -25882,7 +26472,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedY(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedY" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedY(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25912,7 +26512,17 @@ SWIGINTERN PyObject *_wrap_C3_rotatedZ(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "C3_rotatedZ" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + { + try { + result = ((Vec3< std::complex< double > > const *)arg1)->rotatedZ(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new Vec3< std::complex< double > >(result)), SWIGTYPE_p_Vec3T_std__complexT_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25934,7 +26544,17 @@ SWIGINTERN PyObject *_wrap_delete_C3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_C3" "', argument " "1"" of type '" "Vec3< std::complex< double > > *""'"); } arg1 = reinterpret_cast< Vec3< std::complex< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25970,7 +26590,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_iterator(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_iterator" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_Vec3_Sl_double_Sg__Sg__iterator(arg1,arg2); + { + try { + result = (swig::SwigPyIterator *)std_vector_Sl_Vec3_Sl_double_Sg__Sg__iterator(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -25993,7 +26623,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___nonzero__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___nonzero__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____nonzero__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____nonzero__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26016,7 +26656,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___bool__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___bool__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____bool__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = (bool)std_vector_Sl_Vec3_Sl_double_Sg__Sg____bool__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26039,7 +26689,17 @@ SWIGINTERN PyObject *_wrap_vector_R3___len__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3___len__" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg____len__((std::vector< Vec3< double > > const *)arg1); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg____len__((std::vector< Vec3< double > > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26077,12 +26737,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___getslice__(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___getslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26119,12 +26789,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setslice____SWIG_0(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___setslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26174,12 +26854,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setslice____SWIG_1(PyObject *self, Py_ssi } arg4 = ptr; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg4); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; @@ -26281,12 +26971,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delslice__(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_R3___delslice__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg3 = static_cast< std::vector< Vec3< double > >::difference_type >(val3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26315,12 +27015,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delitem____SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3___delitem__" "', argument " "2"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::difference_type >(val2); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26349,12 +27059,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___getitem____SWIG_0(PyObject *self, Py_ssiz } arg2 = (PySliceObject *) swig_obj[1]; } - try { - result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double >,std::allocator< Vec3< double > > > *)std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26395,12 +27115,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_0(PyObject *self, Py_ssiz } arg3 = ptr; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< Vec3< double >,std::allocator< Vec3< double > > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; @@ -26430,12 +27160,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_1(PyObject *self, Py_ssiz } arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26463,12 +27203,22 @@ SWIGINTERN PyObject *_wrap_vector_R3___delitem____SWIG_1(PyObject *self, Py_ssiz } arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26543,10 +27293,20 @@ SWIGINTERN PyObject *_wrap_vector_R3___getitem____SWIG_1(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3___getitem__" "', argument " "2"" of type '" "std::vector< Vec3< double > >::difference_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::difference_type >(val2); - try { - result = (std::vector< Vec3< double > >::value_type *) &std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< Vec3< double > > const *)arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< Vec3< double > >::value_type *) &std_vector_Sl_Vec3_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< Vec3< double > > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); @@ -26632,10 +27392,20 @@ SWIGINTERN PyObject *_wrap_vector_R3___setitem____SWIG_2(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3___setitem__" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - try { - std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -26726,10 +27496,20 @@ SWIGINTERN PyObject *_wrap_vector_R3_pop(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_pop" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - try { - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj((new std::vector< Vec3< double > >::value_type(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -26762,7 +27542,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_append(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_append" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - std_vector_Sl_Vec3_Sl_double_Sg__Sg__append(arg1,(Vec3< double > const &)*arg2); + { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg__append(arg1,(Vec3< double > const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26775,7 +27565,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_0(PyObject *self, Py_ssize_t nobj std::vector< Vec3< double > > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -26801,7 +27601,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_1(PyObject *self, Py_ssize_t nobj } arg1 = ptr; } - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >((std::vector< Vec3< double > > const &)*arg1); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >((std::vector< Vec3< double > > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -26826,7 +27636,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_empty(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_empty" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (bool)((std::vector< Vec3< double > > const *)arg1)->empty(); + { + try { + result = (bool)((std::vector< Vec3< double > > const *)arg1)->empty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -26849,7 +27669,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_size(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_size" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->size(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -26881,7 +27711,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_swap(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_swap" "', argument " "2"" of type '" "std::vector< Vec3< double > > &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > > * >(argp2); - (arg1)->swap(*arg2); + { + try { + (arg1)->swap(*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -26904,7 +27744,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_begin(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_begin" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->begin(); + { + try { + result = (arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26928,7 +27778,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_end(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_end" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->end(); + { + try { + result = (arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26952,7 +27812,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_rbegin(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_rbegin" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->rbegin(); + { + try { + result = (arg1)->rbegin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26976,7 +27846,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_rend(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_rend" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (arg1)->rend(); + { + try { + result = (arg1)->rend(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -26999,7 +27879,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_clear(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_clear" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - (arg1)->clear(); + { + try { + (arg1)->clear(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27022,7 +27912,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_get_allocator(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_get_allocator" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->get_allocator(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->get_allocator(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< Vec3< double > >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27043,7 +27943,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_2(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_R3" "', argument " "1"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg1 = static_cast< std::vector< Vec3< double > >::size_type >(val1); - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27065,7 +27975,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_pop_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_pop_back" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - (arg1)->pop_back(); + { + try { + (arg1)->pop_back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27093,7 +28013,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_resize__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3_resize" "', argument " "2"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::size_type >(val2); - (arg1)->resize(arg2); + { + try { + (arg1)->resize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27128,7 +28058,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_erase__SWIG_0(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3_erase" "', argument " "2"" of type '" "std::vector< Vec3< double > >::iterator""'"); } } - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27178,7 +28118,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_erase__SWIG_1(PyObject *self, Py_ssize_t no SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_R3_erase" "', argument " "3"" of type '" "std::vector< Vec3< double > >::iterator""'"); } } - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27260,7 +28210,17 @@ SWIGINTERN PyObject *_wrap_new_vector_R3__SWIG_3(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vector_R3" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1,(std::vector< Vec3< double > >::value_type const &)*arg2); + { + try { + result = (std::vector< Vec3< double > > *)new std::vector< Vec3< double > >(arg1,(std::vector< Vec3< double > >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -27347,7 +28307,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_push_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_push_back" "', argument " "2"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg2 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp2); - (arg1)->push_back((std::vector< Vec3< double > >::value_type const &)*arg2); + { + try { + (arg1)->push_back((std::vector< Vec3< double > >::value_type const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27370,7 +28340,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_front(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_front" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->front(); + { + try { + result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->front(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -27394,7 +28374,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_back(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_back" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->back(); + { + try { + result = (std::vector< Vec3< double > >::value_type *) &((std::vector< Vec3< double > > const *)arg1)->back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vec3T_double_t, 0 | 0 ); (void)swig::container_owner<swig::traits<std::vector< Vec3< double > >::value_type>::category>::back_reference(resultobj, swig_obj[0]); return resultobj; @@ -27435,7 +28425,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_assign(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_assign" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - (arg1)->assign(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + { + try { + (arg1)->assign(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27474,7 +28474,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_resize__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_resize" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - (arg1)->resize(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + { + try { + (arg1)->resize(arg2,(std::vector< Vec3< double > >::value_type const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27570,7 +28580,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_insert__SWIG_0(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_insert" "', argument " "3"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg3 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp3); - result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + { + try { + result = std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(Vec3< double > const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< Vec3< double > >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -27624,7 +28644,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_insert__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_R3_insert" "', argument " "4"" of type '" "std::vector< Vec3< double > >::value_type const &""'"); } arg4 = reinterpret_cast< std::vector< Vec3< double > >::value_type * >(argp4); - std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(Vec3< double > const &)*arg4); + { + try { + std_vector_Sl_Vec3_Sl_double_Sg__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(Vec3< double > const &)*arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27711,7 +28741,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_reserve(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_R3_reserve" "', argument " "2"" of type '" "std::vector< Vec3< double > >::size_type""'"); } arg2 = static_cast< std::vector< Vec3< double > >::size_type >(val2); - (arg1)->reserve(arg2); + { + try { + (arg1)->reserve(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27734,7 +28774,17 @@ SWIGINTERN PyObject *_wrap_vector_R3_capacity(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_R3_capacity" "', argument " "1"" of type '" "std::vector< Vec3< double > > const *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - result = ((std::vector< Vec3< double > > const *)arg1)->capacity(); + { + try { + result = ((std::vector< Vec3< double > > const *)arg1)->capacity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -27756,7 +28806,17 @@ SWIGINTERN PyObject *_wrap_delete_vector_R3(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_R3" "', argument " "1"" of type '" "std::vector< Vec3< double > > *""'"); } arg1 = reinterpret_cast< std::vector< Vec3< double > > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -27792,7 +28852,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_iterator(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_iterator" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (swig::SwigPyIterator *)std_vector_Sl_INode_SS_const_Sm__Sg__iterator(arg1,arg2); + { + try { + result = (swig::SwigPyIterator *)std_vector_Sl_INode_SS_const_Sm__Sg__iterator(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -27815,7 +28885,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___nonzero__(PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector___nonzero__" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____nonzero__((std::vector< INode const * > const *)arg1); + { + try { + result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____nonzero__((std::vector< INode const * > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -27838,7 +28918,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___bool__(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector___bool__" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____bool__((std::vector< INode const * > const *)arg1); + { + try { + result = (bool)std_vector_Sl_INode_SS_const_Sm__Sg____bool__((std::vector< INode const * > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -27861,7 +28951,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___len__(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector___len__" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = std_vector_Sl_INode_SS_const_Sm__Sg____len__((std::vector< INode const * > const *)arg1); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg____len__((std::vector< INode const * > const *)arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -27899,12 +28999,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getslice__(PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "swig_dummy_type_const_inode_vector___getslice__" "', argument " "3"" of type '" "std::vector< INode const * >::difference_type""'"); } arg3 = static_cast< std::vector< INode const * >::difference_type >(val3); - try { - result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -27941,12 +29051,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setslice____SWIG SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "swig_dummy_type_const_inode_vector___setslice__" "', argument " "3"" of type '" "std::vector< INode const * >::difference_type""'"); } arg3 = static_cast< std::vector< INode const * >::difference_type >(val3); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -27996,12 +29116,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setslice____SWIG } arg4 = ptr; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< INode const *,std::allocator< INode const * > > const &)*arg4); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< INode const *,std::allocator< INode const * > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res4)) delete arg4; @@ -28103,12 +29233,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delslice__(PyObj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "swig_dummy_type_const_inode_vector___delslice__" "', argument " "3"" of type '" "std::vector< INode const * >::difference_type""'"); } arg3 = static_cast< std::vector< INode const * >::difference_type >(val3); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28137,12 +29277,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delitem____SWIG_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector___delitem__" "', argument " "2"" of type '" "std::vector< INode const * >::difference_type""'"); } arg2 = static_cast< std::vector< INode const * >::difference_type >(val2); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28171,12 +29321,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem____SWIG_ } arg2 = (PySliceObject *) swig_obj[1]; } - try { - result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const *,std::allocator< INode const * > > *)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -28217,12 +29377,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ } arg3 = ptr; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< INode const *,std::allocator< INode const * > > const &)*arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< INode const *,std::allocator< INode const * > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; @@ -28252,12 +29422,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ } arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28285,12 +29465,22 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___delitem____SWIG_ } arg2 = (PySliceObject *) swig_obj[1]; } - try { - std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(arg1,arg2); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); - } catch(std::invalid_argument &_e) { - SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28365,10 +29555,20 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___getitem____SWIG_ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector___getitem__" "', argument " "2"" of type '" "std::vector< INode const * >::difference_type""'"); } arg2 = static_cast< std::vector< INode const * >::difference_type >(val2); - try { - result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_1(arg1,SWIG_STD_MOVE(arg2)); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg____getitem____SWIG_1(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; @@ -28450,10 +29650,20 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector___setitem____SWIG_ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector___setitem__" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - try { - std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + std_vector_Sl_INode_SS_const_Sm__Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_Py_Void(); return resultobj; @@ -28545,10 +29755,20 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_pop(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_pop" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - try { - result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg__pop(arg1); - } catch(std::out_of_range &_e) { - SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + { + try { + try { + result = (std::vector< INode const * >::value_type)std_vector_Sl_INode_SS_const_Sm__Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; @@ -28578,7 +29798,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_append(PyObject *s SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "swig_dummy_type_const_inode_vector_append" "', argument " "2"" of type '" "std::vector< INode const * >::value_type""'"); } arg2 = reinterpret_cast< std::vector< INode const * >::value_type >(argp2); - std_vector_Sl_INode_SS_const_Sm__Sg__append(arg1,(INode const *)arg2); + { + try { + std_vector_Sl_INode_SS_const_Sm__Sg__append(arg1,(INode const *)arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28591,7 +29821,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_0(PyObje std::vector< INode const * > *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (std::vector< INode const * > *)new std::vector< INode const * >(); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -28617,7 +29857,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_1(PyObje } arg1 = ptr; } - result = (std::vector< INode const * > *)new std::vector< INode const * >((std::vector< INode const * > const &)*arg1); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >((std::vector< INode const * > const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -28642,7 +29892,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_empty(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_empty" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (bool)((std::vector< INode const * > const *)arg1)->empty(); + { + try { + result = (bool)((std::vector< INode const * > const *)arg1)->empty(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -28665,7 +29925,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_size(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_size" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = ((std::vector< INode const * > const *)arg1)->size(); + { + try { + result = ((std::vector< INode const * > const *)arg1)->size(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -28697,7 +29967,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_swap(PyObject *sel SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "swig_dummy_type_const_inode_vector_swap" "', argument " "2"" of type '" "std::vector< INode const * > &""'"); } arg2 = reinterpret_cast< std::vector< INode const * > * >(argp2); - (arg1)->swap(*arg2); + { + try { + (arg1)->swap(*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28720,7 +30000,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_begin(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_begin" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->begin(); + { + try { + result = (arg1)->begin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -28744,7 +30034,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_end(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_end" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->end(); + { + try { + result = (arg1)->end(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -28768,7 +30068,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_rbegin(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_rbegin" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->rbegin(); + { + try { + result = (arg1)->rbegin(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -28792,7 +30102,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_rend(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_rend" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (arg1)->rend(); + { + try { + result = (arg1)->rend(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::reverse_iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -28815,7 +30135,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_clear(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_clear" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - (arg1)->clear(); + { + try { + (arg1)->clear(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28838,7 +30168,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_get_allocator(PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_get_allocator" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = ((std::vector< INode const * > const *)arg1)->get_allocator(); + { + try { + result = ((std::vector< INode const * > const *)arg1)->get_allocator(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< INode const * >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_INode_const_p_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -28859,7 +30199,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_2(PyObje SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_swig_dummy_type_const_inode_vector" "', argument " "1"" of type '" "std::vector< INode const * >::size_type""'"); } arg1 = static_cast< std::vector< INode const * >::size_type >(val1); - result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -28881,7 +30231,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_pop_back(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_pop_back" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - (arg1)->pop_back(); + { + try { + (arg1)->pop_back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28909,7 +30269,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_resize__SWIG_0(PyO SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector_resize" "', argument " "2"" of type '" "std::vector< INode const * >::size_type""'"); } arg2 = static_cast< std::vector< INode const * >::size_type >(val2); - (arg1)->resize(arg2); + { + try { + (arg1)->resize(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28944,7 +30314,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_erase__SWIG_0(PyOb SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector_erase" "', argument " "2"" of type '" "std::vector< INode const * >::iterator""'"); } } - result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -28994,7 +30374,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_erase__SWIG_1(PyOb SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "swig_dummy_type_const_inode_vector_erase" "', argument " "3"" of type '" "std::vector< INode const * >::iterator""'"); } } - result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -29073,7 +30463,17 @@ SWIGINTERN PyObject *_wrap_new_swig_dummy_type_const_inode_vector__SWIG_3(PyObje SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_swig_dummy_type_const_inode_vector" "', argument " "2"" of type '" "std::vector< INode const * >::value_type""'"); } arg2 = reinterpret_cast< std::vector< INode const * >::value_type >(argp2); - result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1,arg2); + { + try { + result = (std::vector< INode const * > *)new std::vector< INode const * >(arg1,arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29158,7 +30558,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_push_back(PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "swig_dummy_type_const_inode_vector_push_back" "', argument " "2"" of type '" "std::vector< INode const * >::value_type""'"); } arg2 = reinterpret_cast< std::vector< INode const * >::value_type >(argp2); - (arg1)->push_back(arg2); + { + try { + (arg1)->push_back(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29181,7 +30591,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_front(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_front" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->front(); + { + try { + result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->front(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; fail: @@ -29204,7 +30624,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_back(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_back" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->back(); + { + try { + result = (std::vector< INode const * >::value_type)((std::vector< INode const * > const *)arg1)->back(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_INode, 0 | 0 ); return resultobj; fail: @@ -29241,7 +30671,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_assign(PyObject *s SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector_assign" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - (arg1)->assign(arg2,arg3); + { + try { + (arg1)->assign(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29277,7 +30717,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_resize__SWIG_1(PyO SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector_resize" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - (arg1)->resize(arg2,arg3); + { + try { + (arg1)->resize(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29371,7 +30821,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_insert__SWIG_0(PyO SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "swig_dummy_type_const_inode_vector_insert" "', argument " "3"" of type '" "std::vector< INode const * >::value_type""'"); } arg3 = reinterpret_cast< std::vector< INode const * >::value_type >(argp3); - result = std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); + { + try { + result = std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(INode const *)arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< INode const * >::iterator & >(result)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; @@ -29422,7 +30882,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_insert__SWIG_1(PyO SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "swig_dummy_type_const_inode_vector_insert" "', argument " "4"" of type '" "std::vector< INode const * >::value_type""'"); } arg4 = reinterpret_cast< std::vector< INode const * >::value_type >(argp4); - std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(INode const *)arg4); + { + try { + std_vector_Sl_INode_SS_const_Sm__Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(INode const *)arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29511,7 +30981,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_reserve(PyObject * SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "swig_dummy_type_const_inode_vector_reserve" "', argument " "2"" of type '" "std::vector< INode const * >::size_type""'"); } arg2 = static_cast< std::vector< INode const * >::size_type >(val2); - (arg1)->reserve(arg2); + { + try { + (arg1)->reserve(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29534,7 +31014,17 @@ SWIGINTERN PyObject *_wrap_swig_dummy_type_const_inode_vector_capacity(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "swig_dummy_type_const_inode_vector_capacity" "', argument " "1"" of type '" "std::vector< INode const * > const *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - result = ((std::vector< INode const * > const *)arg1)->capacity(); + { + try { + result = ((std::vector< INode const * > const *)arg1)->capacity(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -29556,7 +31046,17 @@ SWIGINTERN PyObject *_wrap_delete_swig_dummy_type_const_inode_vector(PyObject *s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_swig_dummy_type_const_inode_vector" "', argument " "1"" of type '" "std::vector< INode const * > *""'"); } arg1 = reinterpret_cast< std::vector< INode const * > * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29608,7 +31108,17 @@ SWIGINTERN PyObject *_wrap_GetMajorVersionNumber(PyObject *self, PyObject *args) int result; if (!SWIG_Python_UnpackTuple(args, "GetMajorVersionNumber", 0, 0, 0)) SWIG_fail; - result = (int)BornAgain::GetMajorVersionNumber(); + { + try { + result = (int)BornAgain::GetMajorVersionNumber(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -29621,7 +31131,17 @@ SWIGINTERN PyObject *_wrap_GetMinorVersionNumber(PyObject *self, PyObject *args) int result; if (!SWIG_Python_UnpackTuple(args, "GetMinorVersionNumber", 0, 0, 0)) SWIG_fail; - result = (int)BornAgain::GetMinorVersionNumber(); + { + try { + result = (int)BornAgain::GetMinorVersionNumber(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -29634,7 +31154,17 @@ SWIGINTERN PyObject *_wrap_GetName(PyObject *self, PyObject *args) { std::string result; if (!SWIG_Python_UnpackTuple(args, "GetName", 0, 0, 0)) SWIG_fail; - result = BornAgain::GetName(); + { + try { + result = BornAgain::GetName(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -29647,7 +31177,17 @@ SWIGINTERN PyObject *_wrap_GetVersionNumber(PyObject *self, PyObject *args) { std::string result; if (!SWIG_Python_UnpackTuple(args, "GetVersionNumber", 0, 0, 0)) SWIG_fail; - result = BornAgain::GetVersionNumber(); + { + try { + result = BornAgain::GetVersionNumber(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -29660,7 +31200,17 @@ SWIGINTERN PyObject *_wrap_new_IterationInfo(PyObject *self, PyObject *args) { IterationInfo *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_IterationInfo", 0, 0, 0)) SWIG_fail; - result = (IterationInfo *)new IterationInfo(); + { + try { + result = (IterationInfo *)new IterationInfo(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IterationInfo, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29700,7 +31250,17 @@ SWIGINTERN PyObject *_wrap_IterationInfo_update(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IterationInfo_update" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->update((mumufit::Parameters const &)*arg2,arg3); + { + try { + (arg1)->update((mumufit::Parameters const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29723,7 +31283,17 @@ SWIGINTERN PyObject *_wrap_IterationInfo_iterationCount(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IterationInfo_iterationCount" "', argument " "1"" of type '" "IterationInfo const *""'"); } arg1 = reinterpret_cast< IterationInfo * >(argp1); - result = (unsigned int)((IterationInfo const *)arg1)->iterationCount(); + { + try { + result = (unsigned int)((IterationInfo const *)arg1)->iterationCount(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: @@ -29746,7 +31316,17 @@ SWIGINTERN PyObject *_wrap_IterationInfo_chi2(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IterationInfo_chi2" "', argument " "1"" of type '" "IterationInfo const *""'"); } arg1 = reinterpret_cast< IterationInfo * >(argp1); - result = (double)((IterationInfo const *)arg1)->chi2(); + { + try { + result = (double)((IterationInfo const *)arg1)->chi2(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -29769,7 +31349,17 @@ SWIGINTERN PyObject *_wrap_IterationInfo_parameters(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IterationInfo_parameters" "', argument " "1"" of type '" "IterationInfo const *""'"); } arg1 = reinterpret_cast< IterationInfo * >(argp1); - result = ((IterationInfo const *)arg1)->parameters(); + { + try { + result = ((IterationInfo const *)arg1)->parameters(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::Parameters(result)), SWIGTYPE_p_mumufit__Parameters, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -29792,7 +31382,17 @@ SWIGINTERN PyObject *_wrap_IterationInfo_parameterMap(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IterationInfo_parameterMap" "', argument " "1"" of type '" "IterationInfo const *""'"); } arg1 = reinterpret_cast< IterationInfo * >(argp1); - result = ((IterationInfo const *)arg1)->parameterMap(); + { + try { + result = ((IterationInfo const *)arg1)->parameterMap(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::map< std::string,double,std::less< std::string >,std::allocator< std::pair< std::string const,double > > > >(result)); return resultobj; fail: @@ -29814,7 +31414,17 @@ SWIGINTERN PyObject *_wrap_delete_IterationInfo(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IterationInfo" "', argument " "1"" of type '" "IterationInfo *""'"); } arg1 = reinterpret_cast< IterationInfo * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29842,13 +31452,23 @@ SWIGINTERN PyObject *_wrap_new_PyBuilderCallback(PyObject *self, PyObject *args) if (!args) SWIG_fail; swig_obj[0] = args; arg1 = swig_obj[0]; - if ( arg1 != Py_None ) { - /* subclassed */ - result = (PyBuilderCallback *)new SwigDirector_PyBuilderCallback(arg1); - } else { - result = (PyBuilderCallback *)new PyBuilderCallback(); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (PyBuilderCallback *)new SwigDirector_PyBuilderCallback(arg1); + } else { + result = (PyBuilderCallback *)new PyBuilderCallback(); + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PyBuilderCallback, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -29870,7 +31490,17 @@ SWIGINTERN PyObject *_wrap_delete_PyBuilderCallback(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PyBuilderCallback" "', argument " "1"" of type '" "PyBuilderCallback *""'"); } arg1 = reinterpret_cast< PyBuilderCallback * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -29908,10 +31538,20 @@ SWIGINTERN PyObject *_wrap_PyBuilderCallback_build_simulation(PyObject *self, Py director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = (ISimulation *)((PyBuilderCallback const *)arg1)->PyBuilderCallback::build_simulation((mumufit::Parameters const &)*arg2); - } else { - result = (ISimulation *)((PyBuilderCallback const *)arg1)->build_simulation((mumufit::Parameters const &)*arg2); + { + try { + if (upcall) { + result = (ISimulation *)((PyBuilderCallback const *)arg1)->PyBuilderCallback::build_simulation((mumufit::Parameters const &)*arg2); + } else { + result = (ISimulation *)((PyBuilderCallback const *)arg1)->build_simulation((mumufit::Parameters const &)*arg2); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -29972,13 +31612,23 @@ SWIGINTERN PyObject *_wrap_new_PyObserverCallback(PyObject *self, PyObject *args if (!args) SWIG_fail; swig_obj[0] = args; arg1 = swig_obj[0]; - if ( arg1 != Py_None ) { - /* subclassed */ - result = (PyObserverCallback *)new SwigDirector_PyObserverCallback(arg1); - } else { - result = (PyObserverCallback *)new PyObserverCallback(); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (PyObserverCallback *)new SwigDirector_PyObserverCallback(arg1); + } else { + result = (PyObserverCallback *)new PyObserverCallback(); + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PyObserverCallback, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30000,7 +31650,17 @@ SWIGINTERN PyObject *_wrap_delete_PyObserverCallback(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PyObserverCallback" "', argument " "1"" of type '" "PyObserverCallback *""'"); } arg1 = reinterpret_cast< PyObserverCallback * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30037,10 +31697,20 @@ SWIGINTERN PyObject *_wrap_PyObserverCallback_update(PyObject *self, PyObject *a director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - (arg1)->PyObserverCallback::update((FitObjective const &)*arg2); - } else { - (arg1)->update((FitObjective const &)*arg2); + { + try { + if (upcall) { + (arg1)->PyObserverCallback::update((FitObjective const &)*arg2); + } else { + (arg1)->update((FitObjective const &)*arg2); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -30098,13 +31768,23 @@ SWIGINTERN PyObject *_wrap_new_FitObjective(PyObject *self, PyObject *args) { if (!args) SWIG_fail; swig_obj[0] = args; arg1 = swig_obj[0]; - if ( arg1 != Py_None ) { - /* subclassed */ - result = (FitObjective *)new SwigDirector_FitObjective(arg1); - } else { - result = (FitObjective *)new FitObjective(); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (FitObjective *)new SwigDirector_FitObjective(arg1); + } else { + result = (FitObjective *)new FitObjective(); + } + + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FitObjective, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -30126,7 +31806,17 @@ SWIGINTERN PyObject *_wrap_delete_FitObjective(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FitObjective" "', argument " "1"" of type '" "FitObjective *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30178,7 +31868,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_addSimulationAndData_cpp__SWIG_0(PyObjec SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FitObjective_addSimulationAndData_cpp" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg3,arg4); + { + try { + (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -30224,7 +31924,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_addSimulationAndData_cpp__SWIG_1(PyObjec } arg3 = ptr; } - (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg3); + { + try { + (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -30278,7 +31988,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_addSimulationAndData_cpp__SWIG_2(PyObjec SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FitObjective_addSimulationAndData_cpp" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4); + { + try { + (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -30324,7 +32044,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_addSimulationAndData_cpp__SWIG_3(PyObjec } arg3 = ptr; } - (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + { + try { + (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -30391,7 +32121,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_addSimulationAndData_cpp__SWIG_4(PyObjec SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FitObjective_addSimulationAndData_cpp" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg3,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg4,arg5); + { + try { + (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg3,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; if (SWIG_IsNewObj(res4)) delete arg4; @@ -30452,7 +32192,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_addSimulationAndData_cpp__SWIG_5(PyObjec } arg4 = ptr; } - (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg3,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg4); + { + try { + (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg3,(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &)*arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; if (SWIG_IsNewObj(res4)) delete arg4; @@ -30521,7 +32271,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_addSimulationAndData_cpp__SWIG_6(PyObjec SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FitObjective_addSimulationAndData_cpp" "', argument " "5"" of type '" "double""'"); } arg5 = static_cast< double >(val5); - (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5); + { + try { + (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; if (SWIG_IsNewObj(res4)) delete arg4; @@ -30582,7 +32342,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_addSimulationAndData_cpp__SWIG_7(PyObjec } arg4 = ptr; } - (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4); + { + try { + (arg1)->addSimulationAndData((PyBuilderCallback const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; if (SWIG_IsNewObj(res4)) delete arg4; @@ -30824,10 +32594,20 @@ SWIGINTERN PyObject *_wrap_FitObjective_evaluate_cpp(PyObject *self, PyObject *a director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = (double)(arg1)->FitObjective::evaluate((mumufit::Parameters const &)*arg2); - } else { - result = (double)(arg1)->evaluate((mumufit::Parameters const &)*arg2); + { + try { + if (upcall) { + result = (double)(arg1)->FitObjective::evaluate((mumufit::Parameters const &)*arg2); + } else { + result = (double)(arg1)->evaluate((mumufit::Parameters const &)*arg2); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -30869,10 +32649,20 @@ SWIGINTERN PyObject *_wrap_FitObjective_evaluate_residuals_cpp(PyObject *self, P director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==swig_obj[0])); try { - if (upcall) { - result = (arg1)->FitObjective::evaluate_residuals((mumufit::Parameters const &)*arg2); - } else { - result = (arg1)->evaluate_residuals((mumufit::Parameters const &)*arg2); + { + try { + if (upcall) { + result = (arg1)->FitObjective::evaluate_residuals((mumufit::Parameters const &)*arg2); + } else { + result = (arg1)->evaluate_residuals((mumufit::Parameters const &)*arg2); + } + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } } } catch (Swig::DirectorException&) { SWIG_fail; @@ -30905,7 +32695,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_simulationResult__SWIG_0(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FitObjective_simulationResult" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((FitObjective const *)arg1)->simulationResult(arg2); + { + try { + result = ((FitObjective const *)arg1)->simulationResult(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -30926,7 +32726,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_simulationResult__SWIG_1(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_simulationResult" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->simulationResult(); + { + try { + result = ((FitObjective const *)arg1)->simulationResult(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -30997,7 +32807,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_experimentalData__SWIG_0(PyObject *self, SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FitObjective_experimentalData" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((FitObjective const *)arg1)->experimentalData(arg2); + { + try { + result = ((FitObjective const *)arg1)->experimentalData(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -31018,7 +32838,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_experimentalData__SWIG_1(PyObject *self, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_experimentalData" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->experimentalData(); + { + try { + result = ((FitObjective const *)arg1)->experimentalData(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -31089,7 +32919,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_uncertaintyData_cpp__SWIG_0(PyObject *se SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FitObjective_uncertaintyData_cpp" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((FitObjective const *)arg1)->uncertaintyData(arg2); + { + try { + result = ((FitObjective const *)arg1)->uncertaintyData(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -31110,7 +32950,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_uncertaintyData_cpp__SWIG_1(PyObject *se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_uncertaintyData_cpp" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->uncertaintyData(); + { + try { + result = ((FitObjective const *)arg1)->uncertaintyData(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -31181,7 +33031,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_relativeDifference__SWIG_0(PyObject *sel SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FitObjective_relativeDifference" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((FitObjective const *)arg1)->relativeDifference(arg2); + { + try { + result = ((FitObjective const *)arg1)->relativeDifference(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -31202,7 +33062,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_relativeDifference__SWIG_1(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_relativeDifference" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->relativeDifference(); + { + try { + result = ((FitObjective const *)arg1)->relativeDifference(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -31273,7 +33143,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_absoluteDifference__SWIG_0(PyObject *sel SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FitObjective_absoluteDifference" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = ((FitObjective const *)arg1)->absoluteDifference(arg2); + { + try { + result = ((FitObjective const *)arg1)->absoluteDifference(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -31294,7 +33174,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_absoluteDifference__SWIG_1(PyObject *sel SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_absoluteDifference" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->absoluteDifference(); + { + try { + result = ((FitObjective const *)arg1)->absoluteDifference(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -31359,7 +33249,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_experimental_array(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_experimental_array" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->experimental_array(); + { + try { + result = ((FitObjective const *)arg1)->experimental_array(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -31382,7 +33282,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_simulation_array(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_simulation_array" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->simulation_array(); + { + try { + result = ((FitObjective const *)arg1)->simulation_array(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -31405,7 +33315,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_uncertainties_cpp(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_uncertainties_cpp" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->uncertainties(); + { + try { + result = ((FitObjective const *)arg1)->uncertainties(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -31428,7 +33348,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_weights_array(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_weights_array" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->weights_array(); + { + try { + result = ((FitObjective const *)arg1)->weights_array(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< double,std::allocator< double > > >(result)); return resultobj; fail: @@ -31457,7 +33387,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_initPrint(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FitObjective_initPrint" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); - (arg1)->initPrint(arg2); + { + try { + (arg1)->initPrint(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31497,7 +33437,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_initPlot_cpp(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FitObjective_initPlot_cpp" "', argument " "3"" of type '" "PyObserverCallback &""'"); } arg3 = reinterpret_cast< PyObserverCallback * >(argp3); - (arg1)->initPlot(arg2,*arg3); + { + try { + (arg1)->initPlot(arg2,*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31520,7 +33470,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_iterationInfo(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_iterationInfo" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->iterationInfo(); + { + try { + result = ((FitObjective const *)arg1)->iterationInfo(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new IterationInfo(result)), SWIGTYPE_p_IterationInfo, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -31543,7 +33503,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_minimizerResult(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_minimizerResult" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = ((FitObjective const *)arg1)->minimizerResult(); + { + try { + result = ((FitObjective const *)arg1)->minimizerResult(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new mumufit::MinimizerResult(result)), SWIGTYPE_p_mumufit__MinimizerResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -31575,7 +33545,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_finalize_cpp(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FitObjective_finalize_cpp" "', argument " "2"" of type '" "mumufit::MinimizerResult const &""'"); } arg2 = reinterpret_cast< mumufit::MinimizerResult * >(argp2); - (arg1)->finalize((mumufit::MinimizerResult const &)*arg2); + { + try { + (arg1)->finalize((mumufit::MinimizerResult const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31598,7 +33578,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_fitObjectCount(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_fitObjectCount" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = (unsigned int)((FitObjective const *)arg1)->fitObjectCount(); + { + try { + result = (unsigned int)((FitObjective const *)arg1)->fitObjectCount(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: @@ -31630,7 +33620,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_execSimulations(PyObject *self, PyObject SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FitObjective_execSimulations" "', argument " "2"" of type '" "mumufit::Parameters const &""'"); } arg2 = reinterpret_cast< mumufit::Parameters * >(argp2); - (arg1)->execSimulations((mumufit::Parameters const &)*arg2); + { + try { + (arg1)->execSimulations((mumufit::Parameters const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31662,7 +33662,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_setChiSquaredModule(PyObject *self, PyOb SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FitObjective_setChiSquaredModule" "', argument " "2"" of type '" "IChiSquaredModule const &""'"); } arg2 = reinterpret_cast< IChiSquaredModule * >(argp2); - (arg1)->setChiSquaredModule((IChiSquaredModule const &)*arg2); + { + try { + (arg1)->setChiSquaredModule((IChiSquaredModule const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31695,7 +33705,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_setObjectiveMetric__SWIG_0(PyObject *sel } arg2 = ptr; } - (arg1)->setObjectiveMetric((std::string const &)*arg2); + { + try { + (arg1)->setObjectiveMetric((std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -31743,7 +33763,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_setObjectiveMetric__SWIG_1(PyObject *sel } arg3 = ptr; } - (arg1)->setObjectiveMetric((std::string const &)*arg2,(std::string const &)*arg3); + { + try { + (arg1)->setObjectiveMetric((std::string const &)*arg2,(std::string const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; if (SWIG_IsNewObj(res3)) delete arg3; @@ -31825,7 +33855,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_containsUncertainties_cpp(PyObject *self SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FitObjective_containsUncertainties_cpp" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); - result = (bool)((FitObjective const *)arg1)->containsUncertainties(arg2); + { + try { + result = (bool)((FitObjective const *)arg1)->containsUncertainties(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31848,7 +33888,17 @@ SWIGINTERN PyObject *_wrap_FitObjective_allPairsHaveUncertainties_cpp(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FitObjective_allPairsHaveUncertainties_cpp" "', argument " "1"" of type '" "FitObjective const *""'"); } arg1 = reinterpret_cast< FitObjective * >(argp1); - result = (bool)((FitObjective const *)arg1)->allPairsHaveUncertainties(); + { + try { + result = (bool)((FitObjective const *)arg1)->allPairsHaveUncertainties(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -31907,7 +33957,17 @@ SWIGINTERN PyObject *_wrap_delete_IBeamScan(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IBeamScan" "', argument " "1"" of type '" "IBeamScan *""'"); } arg1 = reinterpret_cast< IBeamScan * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -31930,7 +33990,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IBeamScan_clone" "', argument " "1"" of type '" "IBeamScan const *""'"); } arg1 = reinterpret_cast< IBeamScan * >(argp1); - result = (IBeamScan *)((IBeamScan const *)arg1)->clone(); + { + try { + result = (IBeamScan *)((IBeamScan const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IBeamScan, 0 | 0 ); return resultobj; fail: @@ -31953,7 +34023,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_nodeChildren(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IBeamScan_nodeChildren" "', argument " "1"" of type '" "IBeamScan const *""'"); } arg1 = reinterpret_cast< IBeamScan * >(argp1); - result = ((IBeamScan const *)arg1)->nodeChildren(); + { + try { + result = ((IBeamScan const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -31982,7 +34062,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_setWavelength(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IBeamScan_setWavelength" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setWavelength(arg2); + { + try { + (arg1)->setWavelength(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32011,7 +34101,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_setIntensity(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IBeamScan_setIntensity" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setIntensity(arg2); + { + try { + (arg1)->setIntensity(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32048,7 +34148,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_setPolarization(PyObject *self, PyObject *a if (SWIG_IsNewObj(res2)) delete temp; } } - (arg1)->setPolarization(arg2); + { + try { + (arg1)->setPolarization(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32092,7 +34202,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_setAnalyzer__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IBeamScan_setAnalyzer" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->setAnalyzer(arg2,arg3); + { + try { + (arg1)->setAnalyzer(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32128,7 +34248,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_setAnalyzer__SWIG_1(PyObject *self, Py_ssiz if (SWIG_IsNewObj(res2)) delete temp; } } - (arg1)->setAnalyzer(arg2); + { + try { + (arg1)->setAnalyzer(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32148,7 +34278,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_setAnalyzer__SWIG_2(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IBeamScan_setAnalyzer" "', argument " "1"" of type '" "IBeamScan *""'"); } arg1 = reinterpret_cast< IBeamScan * >(argp1); - (arg1)->setAnalyzer(); + { + try { + (arg1)->setAnalyzer(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32200,7 +34340,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_setAnalyzer__SWIG_3(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IBeamScan_setAnalyzer" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->setAnalyzer(arg2,arg3,arg4); + { + try { + (arg1)->setAnalyzer(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32315,7 +34465,17 @@ SWIGINTERN PyObject *_wrap_IBeamScan_setFootprint(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IBeamScan_setFootprint" "', argument " "2"" of type '" "IFootprint const *""'"); } arg2 = reinterpret_cast< IFootprint * >(argp2); - (arg1)->setFootprint((IFootprint const *)arg2); + { + try { + (arg1)->setFootprint((IFootprint const *)arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32346,7 +34506,17 @@ SWIGINTERN PyObject *_wrap_new_AlphaScan__SWIG_0(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AlphaScan" "', argument " "1"" of type '" "Scale const &""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (AlphaScan *)new AlphaScan((Scale const &)*arg1); + { + try { + result = (AlphaScan *)new AlphaScan((Scale const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AlphaScan, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32383,7 +34553,17 @@ SWIGINTERN PyObject *_wrap_new_AlphaScan__SWIG_1(PyObject *self, Py_ssize_t nobj SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AlphaScan" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (AlphaScan *)new AlphaScan(arg1,arg2,arg3); + { + try { + result = (AlphaScan *)new AlphaScan(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AlphaScan, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32453,7 +34633,17 @@ SWIGINTERN PyObject *_wrap_delete_AlphaScan(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlphaScan" "', argument " "1"" of type '" "AlphaScan *""'"); } arg1 = reinterpret_cast< AlphaScan * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32476,7 +34666,17 @@ SWIGINTERN PyObject *_wrap_AlphaScan_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlphaScan_clone" "', argument " "1"" of type '" "AlphaScan const *""'"); } arg1 = reinterpret_cast< AlphaScan * >(argp1); - result = (AlphaScan *)((AlphaScan const *)arg1)->clone(); + { + try { + result = (AlphaScan *)((AlphaScan const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AlphaScan, 0 | 0 ); return resultobj; fail: @@ -32499,7 +34699,17 @@ SWIGINTERN PyObject *_wrap_AlphaScan_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlphaScan_className" "', argument " "1"" of type '" "AlphaScan const *""'"); } arg1 = reinterpret_cast< AlphaScan * >(argp1); - result = ((AlphaScan const *)arg1)->className(); + { + try { + result = ((AlphaScan const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -32522,7 +34732,17 @@ SWIGINTERN PyObject *_wrap_AlphaScan_nodeChildren(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlphaScan_nodeChildren" "', argument " "1"" of type '" "AlphaScan const *""'"); } arg1 = reinterpret_cast< AlphaScan * >(argp1); - result = ((AlphaScan const *)arg1)->nodeChildren(); + { + try { + result = ((AlphaScan const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -32554,7 +34774,17 @@ SWIGINTERN PyObject *_wrap_AlphaScan_setWavelengthDistribution(PyObject *self, P SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AlphaScan_setWavelengthDistribution" "', argument " "2"" of type '" "IDistribution1D const &""'"); } arg2 = reinterpret_cast< IDistribution1D * >(argp2); - (arg1)->setWavelengthDistribution((IDistribution1D const &)*arg2); + { + try { + (arg1)->setWavelengthDistribution((IDistribution1D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32586,7 +34816,17 @@ SWIGINTERN PyObject *_wrap_AlphaScan_setAngleDistribution(PyObject *self, PyObje SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AlphaScan_setAngleDistribution" "', argument " "2"" of type '" "IDistribution1D const &""'"); } arg2 = reinterpret_cast< IDistribution1D * >(argp2); - (arg1)->setAngleDistribution((IDistribution1D const &)*arg2); + { + try { + (arg1)->setAngleDistribution((IDistribution1D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32615,7 +34855,17 @@ SWIGINTERN PyObject *_wrap_AlphaScan_setWavelength(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlphaScan_setWavelength" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setWavelength(arg2); + { + try { + (arg1)->setWavelength(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32644,7 +34894,17 @@ SWIGINTERN PyObject *_wrap_AlphaScan_setAlphaOffset(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlphaScan_setAlphaOffset" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setAlphaOffset(arg2); + { + try { + (arg1)->setAlphaOffset(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32678,7 +34938,17 @@ SWIGINTERN PyObject *_wrap_new_QzScan__SWIG_0(PyObject *self, Py_ssize_t nobjs, arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (QzScan *)new QzScan(arg1); + { + try { + result = (QzScan *)new QzScan(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QzScan, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32702,7 +34972,17 @@ SWIGINTERN PyObject *_wrap_new_QzScan__SWIG_1(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QzScan" "', argument " "1"" of type '" "Scale const &""'"); } arg1 = reinterpret_cast< Scale * >(argp1); - result = (QzScan *)new QzScan((Scale const &)*arg1); + { + try { + result = (QzScan *)new QzScan((Scale const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QzScan, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32739,7 +35019,17 @@ SWIGINTERN PyObject *_wrap_new_QzScan__SWIG_2(PyObject *self, Py_ssize_t nobjs, SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_QzScan" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (QzScan *)new QzScan(arg1,arg2,arg3); + { + try { + result = (QzScan *)new QzScan(arg1,arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QzScan, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -32818,7 +35108,17 @@ SWIGINTERN PyObject *_wrap_delete_QzScan(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QzScan" "', argument " "1"" of type '" "QzScan *""'"); } arg1 = reinterpret_cast< QzScan * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32841,7 +35141,17 @@ SWIGINTERN PyObject *_wrap_QzScan_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QzScan_clone" "', argument " "1"" of type '" "QzScan const *""'"); } arg1 = reinterpret_cast< QzScan * >(argp1); - result = (QzScan *)((QzScan const *)arg1)->clone(); + { + try { + result = (QzScan *)((QzScan const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QzScan, 0 | 0 ); return resultobj; fail: @@ -32864,7 +35174,17 @@ SWIGINTERN PyObject *_wrap_QzScan_className(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QzScan_className" "', argument " "1"" of type '" "QzScan const *""'"); } arg1 = reinterpret_cast< QzScan * >(argp1); - result = ((QzScan const *)arg1)->className(); + { + try { + result = ((QzScan const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -32887,7 +35207,17 @@ SWIGINTERN PyObject *_wrap_QzScan_nodeChildren(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QzScan_nodeChildren" "', argument " "1"" of type '" "QzScan const *""'"); } arg1 = reinterpret_cast< QzScan * >(argp1); - result = ((QzScan const *)arg1)->nodeChildren(); + { + try { + result = ((QzScan const *)arg1)->nodeChildren(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = swig::from(static_cast< std::vector< INode const*,std::allocator< INode const * > > >(result)); return resultobj; fail: @@ -32916,7 +35246,17 @@ SWIGINTERN PyObject *_wrap_QzScan_setWavelength(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QzScan_setWavelength" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setWavelength(arg2); + { + try { + (arg1)->setWavelength(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32956,7 +35296,17 @@ SWIGINTERN PyObject *_wrap_QzScan_setRelativeQResolution(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "QzScan_setRelativeQResolution" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->setRelativeQResolution((IDistribution1D const &)*arg2,arg3); + { + try { + (arg1)->setRelativeQResolution((IDistribution1D const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -32996,7 +35346,17 @@ SWIGINTERN PyObject *_wrap_QzScan_setAbsoluteQResolution(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "QzScan_setAbsoluteQResolution" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - (arg1)->setAbsoluteQResolution((IDistribution1D const &)*arg2,arg3); + { + try { + (arg1)->setAbsoluteQResolution((IDistribution1D const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33041,7 +35401,17 @@ SWIGINTERN PyObject *_wrap_QzScan_setVectorResolution(PyObject *self, PyObject * } arg3 = ptr; } - (arg1)->setVectorResolution((IDistribution1D const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + { + try { + (arg1)->setVectorResolution((IDistribution1D const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -33072,7 +35442,17 @@ SWIGINTERN PyObject *_wrap_QzScan_setOffset(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QzScan_setOffset" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - (arg1)->setOffset(arg2); + { + try { + (arg1)->setOffset(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33105,7 +35485,17 @@ SWIGINTERN PyObject *_wrap_delete_ISimulation(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ISimulation" "', argument " "1"" of type '" "ISimulation *""'"); } arg1 = reinterpret_cast< ISimulation * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33137,7 +35527,17 @@ SWIGINTERN PyObject *_wrap_ISimulation_setBackground(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ISimulation_setBackground" "', argument " "2"" of type '" "IBackground const &""'"); } arg2 = reinterpret_cast< IBackground * >(argp2); - (arg1)->setBackground((IBackground const &)*arg2); + { + try { + (arg1)->setBackground((IBackground const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33177,7 +35577,17 @@ SWIGINTERN PyObject *_wrap_ISimulation_addParameterDistribution(PyObject *self, SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ISimulation_addParameterDistribution" "', argument " "3"" of type '" "IDistribution1D const &""'"); } arg3 = reinterpret_cast< IDistribution1D * >(argp3); - (arg1)->addParameterDistribution(arg2,(IDistribution1D const &)*arg3); + { + try { + (arg1)->addParameterDistribution(arg2,(IDistribution1D const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33199,7 +35609,17 @@ SWIGINTERN PyObject *_wrap_ISimulation_setTerminalProgressMonitor(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_setTerminalProgressMonitor" "', argument " "1"" of type '" "ISimulation *""'"); } arg1 = reinterpret_cast< ISimulation * >(argp1); - (arg1)->setTerminalProgressMonitor(); + { + try { + (arg1)->setTerminalProgressMonitor(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33222,7 +35642,17 @@ SWIGINTERN PyObject *_wrap_ISimulation_options(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_options" "', argument " "1"" of type '" "ISimulation *""'"); } arg1 = reinterpret_cast< ISimulation * >(argp1); - result = (SimulationOptions *) &(arg1)->options(); + { + try { + result = (SimulationOptions *) &(arg1)->options(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimulationOptions, 0 | 0 ); return resultobj; fail: @@ -33245,7 +35675,17 @@ SWIGINTERN PyObject *_wrap_ISimulation_simulate(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_simulate" "', argument " "1"" of type '" "ISimulation *""'"); } arg1 = reinterpret_cast< ISimulation * >(argp1); - result = (arg1)->simulate(); + { + try { + result = (arg1)->simulate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new SimulationResult(result)), SWIGTYPE_p_SimulationResult, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -33299,7 +35739,17 @@ SWIGINTERN PyObject *_wrap_new_ScatteringSimulation(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ScatteringSimulation" "', argument " "3"" of type '" "IDetector const &""'"); } arg3 = reinterpret_cast< IDetector * >(argp3); - result = (ScatteringSimulation *)new ScatteringSimulation((Beam const &)*arg1,(MultiLayer const &)*arg2,(IDetector const &)*arg3); + { + try { + result = (ScatteringSimulation *)new ScatteringSimulation((Beam const &)*arg1,(MultiLayer const &)*arg2,(IDetector const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ScatteringSimulation, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33321,7 +35771,17 @@ SWIGINTERN PyObject *_wrap_delete_ScatteringSimulation(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ScatteringSimulation" "', argument " "1"" of type '" "ScatteringSimulation *""'"); } arg1 = reinterpret_cast< ScatteringSimulation * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33344,7 +35804,17 @@ SWIGINTERN PyObject *_wrap_ScatteringSimulation_className(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScatteringSimulation_className" "', argument " "1"" of type '" "ScatteringSimulation const *""'"); } arg1 = reinterpret_cast< ScatteringSimulation * >(argp1); - result = ((ScatteringSimulation const *)arg1)->className(); + { + try { + result = ((ScatteringSimulation const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -33367,7 +35837,17 @@ SWIGINTERN PyObject *_wrap_ScatteringSimulation_beam(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScatteringSimulation_beam" "', argument " "1"" of type '" "ScatteringSimulation *""'"); } arg1 = reinterpret_cast< ScatteringSimulation * >(argp1); - result = (Beam *) &(arg1)->beam(); + { + try { + result = (Beam *) &(arg1)->beam(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Beam, 0 | 0 ); return resultobj; fail: @@ -33390,7 +35870,17 @@ SWIGINTERN PyObject *_wrap_ScatteringSimulation_detector(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScatteringSimulation_detector" "', argument " "1"" of type '" "ScatteringSimulation *""'"); } arg1 = reinterpret_cast< ScatteringSimulation * >(argp1); - result = (IDetector *) &(arg1)->detector(); + { + try { + result = (IDetector *) &(arg1)->detector(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetector, 0 | 0 ); return resultobj; fail: @@ -33539,7 +36029,17 @@ SWIGINTERN PyObject *_wrap_new_DepthprobeSimulation__SWIG_0(PyObject *self, Py_s SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DepthprobeSimulation" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - result = (DepthprobeSimulation *)new DepthprobeSimulation((IBeamScan const &)*arg1,(MultiLayer const &)*arg2,(Scale const &)*arg3,arg4); + { + try { + result = (DepthprobeSimulation *)new DepthprobeSimulation((IBeamScan const &)*arg1,(MultiLayer const &)*arg2,(Scale const &)*arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DepthprobeSimulation, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33585,7 +36085,17 @@ SWIGINTERN PyObject *_wrap_new_DepthprobeSimulation__SWIG_1(PyObject *self, Py_s SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepthprobeSimulation" "', argument " "3"" of type '" "Scale const &""'"); } arg3 = reinterpret_cast< Scale * >(argp3); - result = (DepthprobeSimulation *)new DepthprobeSimulation((IBeamScan const &)*arg1,(MultiLayer const &)*arg2,(Scale const &)*arg3); + { + try { + result = (DepthprobeSimulation *)new DepthprobeSimulation((IBeamScan const &)*arg1,(MultiLayer const &)*arg2,(Scale const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DepthprobeSimulation, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33663,7 +36173,17 @@ SWIGINTERN PyObject *_wrap_delete_DepthprobeSimulation(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DepthprobeSimulation" "', argument " "1"" of type '" "DepthprobeSimulation *""'"); } arg1 = reinterpret_cast< DepthprobeSimulation * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33686,7 +36206,17 @@ SWIGINTERN PyObject *_wrap_DepthprobeSimulation_className(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DepthprobeSimulation_className" "', argument " "1"" of type '" "DepthprobeSimulation const *""'"); } arg1 = reinterpret_cast< DepthprobeSimulation * >(argp1); - result = ((DepthprobeSimulation const *)arg1)->className(); + { + try { + result = ((DepthprobeSimulation const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -33733,7 +36263,17 @@ SWIGINTERN PyObject *_wrap_new_SpecularSimulation(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpecularSimulation" "', argument " "2"" of type '" "MultiLayer const &""'"); } arg2 = reinterpret_cast< MultiLayer * >(argp2); - result = (SpecularSimulation *)new SpecularSimulation((IBeamScan const &)*arg1,(MultiLayer const &)*arg2); + { + try { + result = (SpecularSimulation *)new SpecularSimulation((IBeamScan const &)*arg1,(MultiLayer const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpecularSimulation, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33755,7 +36295,17 @@ SWIGINTERN PyObject *_wrap_delete_SpecularSimulation(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpecularSimulation" "', argument " "1"" of type '" "SpecularSimulation *""'"); } arg1 = reinterpret_cast< SpecularSimulation * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33778,7 +36328,17 @@ SWIGINTERN PyObject *_wrap_SpecularSimulation_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpecularSimulation_className" "', argument " "1"" of type '" "SpecularSimulation const *""'"); } arg1 = reinterpret_cast< SpecularSimulation * >(argp1); - result = ((SpecularSimulation const *)arg1)->className(); + { + try { + result = ((SpecularSimulation const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -33836,7 +36396,17 @@ SWIGINTERN PyObject *_wrap_new_OffspecSimulation(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OffspecSimulation" "', argument " "3"" of type '" "OffspecDetector const &""'"); } arg3 = reinterpret_cast< OffspecDetector * >(argp3); - result = (OffspecSimulation *)new OffspecSimulation((IBeamScan const &)*arg1,(MultiLayer const &)*arg2,(OffspecDetector const &)*arg3); + { + try { + result = (OffspecSimulation *)new OffspecSimulation((IBeamScan const &)*arg1,(MultiLayer const &)*arg2,(OffspecDetector const &)*arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OffspecSimulation, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -33858,7 +36428,17 @@ SWIGINTERN PyObject *_wrap_delete_OffspecSimulation(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OffspecSimulation" "', argument " "1"" of type '" "OffspecSimulation *""'"); } arg1 = reinterpret_cast< OffspecSimulation * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33881,7 +36461,17 @@ SWIGINTERN PyObject *_wrap_OffspecSimulation_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OffspecSimulation_className" "', argument " "1"" of type '" "OffspecSimulation const *""'"); } arg1 = reinterpret_cast< OffspecSimulation * >(argp1); - result = ((OffspecSimulation const *)arg1)->className(); + { + try { + result = ((OffspecSimulation const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -33914,7 +36504,17 @@ SWIGINTERN PyObject *_wrap_delete_IBackground(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IBackground" "', argument " "1"" of type '" "IBackground *""'"); } arg1 = reinterpret_cast< IBackground * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -33937,7 +36537,17 @@ SWIGINTERN PyObject *_wrap_IBackground_clone(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IBackground_clone" "', argument " "1"" of type '" "IBackground const *""'"); } arg1 = reinterpret_cast< IBackground * >(argp1); - result = (IBackground *)((IBackground const *)arg1)->clone(); + { + try { + result = (IBackground *)((IBackground const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IBackground, 0 | 0 ); return resultobj; fail: @@ -33967,7 +36577,17 @@ SWIGINTERN PyObject *_wrap_IBackground_addBackground(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IBackground_addBackground" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((IBackground const *)arg1)->addBackground(arg2); + { + try { + result = (double)((IBackground const *)arg1)->addBackground(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -33997,7 +36617,17 @@ SWIGINTERN PyObject *_wrap_new_ConstantBackground__SWIG_0(PyObject *self, Py_ssi arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (ConstantBackground *)new ConstantBackground(arg1); + { + try { + result = (ConstantBackground *)new ConstantBackground(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantBackground, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34018,7 +36648,17 @@ SWIGINTERN PyObject *_wrap_new_ConstantBackground__SWIG_1(PyObject *self, Py_ssi SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantBackground" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (ConstantBackground *)new ConstantBackground(arg1); + { + try { + result = (ConstantBackground *)new ConstantBackground(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantBackground, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34077,7 +36717,17 @@ SWIGINTERN PyObject *_wrap_ConstantBackground_clone(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantBackground_clone" "', argument " "1"" of type '" "ConstantBackground const *""'"); } arg1 = reinterpret_cast< ConstantBackground * >(argp1); - result = (ConstantBackground *)((ConstantBackground const *)arg1)->clone(); + { + try { + result = (ConstantBackground *)((ConstantBackground const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantBackground, 0 | 0 ); return resultobj; fail: @@ -34100,7 +36750,17 @@ SWIGINTERN PyObject *_wrap_ConstantBackground_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantBackground_className" "', argument " "1"" of type '" "ConstantBackground const *""'"); } arg1 = reinterpret_cast< ConstantBackground * >(argp1); - result = ((ConstantBackground const *)arg1)->className(); + { + try { + result = ((ConstantBackground const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34123,7 +36783,17 @@ SWIGINTERN PyObject *_wrap_ConstantBackground_parDefs(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantBackground_parDefs" "', argument " "1"" of type '" "ConstantBackground const *""'"); } arg1 = reinterpret_cast< ConstantBackground * >(argp1); - result = ((ConstantBackground const *)arg1)->parDefs(); + { + try { + result = ((ConstantBackground const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -34146,7 +36816,17 @@ SWIGINTERN PyObject *_wrap_ConstantBackground_backgroundValue(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantBackground_backgroundValue" "', argument " "1"" of type '" "ConstantBackground const *""'"); } arg1 = reinterpret_cast< ConstantBackground * >(argp1); - result = (double)((ConstantBackground const *)arg1)->backgroundValue(); + { + try { + result = (double)((ConstantBackground const *)arg1)->backgroundValue(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -34176,7 +36856,17 @@ SWIGINTERN PyObject *_wrap_ConstantBackground_addBackground(PyObject *self, PyOb SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConstantBackground_addBackground" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((ConstantBackground const *)arg1)->addBackground(arg2); + { + try { + result = (double)((ConstantBackground const *)arg1)->addBackground(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -34199,7 +36889,17 @@ SWIGINTERN PyObject *_wrap_ConstantBackground_validate(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantBackground_validate" "', argument " "1"" of type '" "ConstantBackground const *""'"); } arg1 = reinterpret_cast< ConstantBackground * >(argp1); - result = ((ConstantBackground const *)arg1)->validate(); + { + try { + result = ((ConstantBackground const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34221,7 +36921,17 @@ SWIGINTERN PyObject *_wrap_delete_ConstantBackground(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantBackground" "', argument " "1"" of type '" "ConstantBackground *""'"); } arg1 = reinterpret_cast< ConstantBackground * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34245,7 +36955,17 @@ SWIGINTERN PyObject *_wrap_new_PoissonBackground(PyObject *self, PyObject *args) PoissonBackground *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_PoissonBackground", 0, 0, 0)) SWIG_fail; - result = (PoissonBackground *)new PoissonBackground(); + { + try { + result = (PoissonBackground *)new PoissonBackground(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PoissonBackground, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34268,7 +36988,17 @@ SWIGINTERN PyObject *_wrap_PoissonBackground_clone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PoissonBackground_clone" "', argument " "1"" of type '" "PoissonBackground const *""'"); } arg1 = reinterpret_cast< PoissonBackground * >(argp1); - result = (PoissonBackground *)((PoissonBackground const *)arg1)->clone(); + { + try { + result = (PoissonBackground *)((PoissonBackground const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PoissonBackground, 0 | 0 ); return resultobj; fail: @@ -34291,7 +37021,17 @@ SWIGINTERN PyObject *_wrap_PoissonBackground_className(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PoissonBackground_className" "', argument " "1"" of type '" "PoissonBackground const *""'"); } arg1 = reinterpret_cast< PoissonBackground * >(argp1); - result = ((PoissonBackground const *)arg1)->className(); + { + try { + result = ((PoissonBackground const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34321,7 +37061,17 @@ SWIGINTERN PyObject *_wrap_PoissonBackground_addBackground(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PoissonBackground_addBackground" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((PoissonBackground const *)arg1)->addBackground(arg2); + { + try { + result = (double)((PoissonBackground const *)arg1)->addBackground(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -34343,7 +37093,17 @@ SWIGINTERN PyObject *_wrap_delete_PoissonBackground(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PoissonBackground" "', argument " "1"" of type '" "PoissonBackground *""'"); } arg1 = reinterpret_cast< PoissonBackground * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34380,7 +37140,17 @@ SWIGINTERN PyObject *_wrap_sampleCode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sampleCode" "', argument " "1"" of type '" "MultiLayer const &""'"); } arg1 = reinterpret_cast< MultiLayer * >(argp1); - result = Py::Export::sampleCode((MultiLayer const &)*arg1); + { + try { + result = Py::Export::sampleCode((MultiLayer const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34406,7 +37176,17 @@ SWIGINTERN PyObject *_wrap_simulationPlotCode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "simulationPlotCode" "', argument " "1"" of type '" "ISimulation const &""'"); } arg1 = reinterpret_cast< ISimulation * >(argp1); - result = Py::Export::simulationPlotCode((ISimulation const &)*arg1); + { + try { + result = Py::Export::simulationPlotCode((ISimulation const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: @@ -34444,7 +37224,17 @@ SWIGINTERN PyObject *_wrap_simulationSaveCode(PyObject *self, PyObject *args) { } arg2 = ptr; } - result = Py::Export::simulationSaveCode((ISimulation const &)*arg1,(std::string const &)*arg2); + { + try { + result = Py::Export::simulationSaveCode((ISimulation const &)*arg1,(std::string const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_std_string(static_cast< std::string >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; @@ -34468,7 +37258,17 @@ SWIGINTERN PyObject *_wrap_delete_IIntensityFunction(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IIntensityFunction" "', argument " "1"" of type '" "IIntensityFunction *""'"); } arg1 = reinterpret_cast< IIntensityFunction * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34491,7 +37291,17 @@ SWIGINTERN PyObject *_wrap_IIntensityFunction_clone(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IIntensityFunction_clone" "', argument " "1"" of type '" "IIntensityFunction const *""'"); } arg1 = reinterpret_cast< IIntensityFunction * >(argp1); - result = (IIntensityFunction *)((IIntensityFunction const *)arg1)->clone(); + { + try { + result = (IIntensityFunction *)((IIntensityFunction const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IIntensityFunction, 0 | 0 ); return resultobj; fail: @@ -34521,7 +37331,17 @@ SWIGINTERN PyObject *_wrap_IIntensityFunction_evaluate(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IIntensityFunction_evaluate" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((IIntensityFunction const *)arg1)->evaluate(arg2); + { + try { + result = (double)((IIntensityFunction const *)arg1)->evaluate(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -34551,7 +37371,17 @@ SWIGINTERN PyObject *_wrap_IntensityFunctionLog_clone(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityFunctionLog_clone" "', argument " "1"" of type '" "IntensityFunctionLog const *""'"); } arg1 = reinterpret_cast< IntensityFunctionLog * >(argp1); - result = (IntensityFunctionLog *)((IntensityFunctionLog const *)arg1)->clone(); + { + try { + result = (IntensityFunctionLog *)((IntensityFunctionLog const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntensityFunctionLog, 0 | 0 ); return resultobj; fail: @@ -34581,7 +37411,17 @@ SWIGINTERN PyObject *_wrap_IntensityFunctionLog_evaluate(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityFunctionLog_evaluate" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((IntensityFunctionLog const *)arg1)->evaluate(arg2); + { + try { + result = (double)((IntensityFunctionLog const *)arg1)->evaluate(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -34594,7 +37434,17 @@ SWIGINTERN PyObject *_wrap_new_IntensityFunctionLog(PyObject *self, PyObject *ar IntensityFunctionLog *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_IntensityFunctionLog", 0, 0, 0)) SWIG_fail; - result = (IntensityFunctionLog *)new IntensityFunctionLog(); + { + try { + result = (IntensityFunctionLog *)new IntensityFunctionLog(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntensityFunctionLog, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34616,7 +37466,17 @@ SWIGINTERN PyObject *_wrap_delete_IntensityFunctionLog(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntensityFunctionLog" "', argument " "1"" of type '" "IntensityFunctionLog *""'"); } arg1 = reinterpret_cast< IntensityFunctionLog * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34650,7 +37510,17 @@ SWIGINTERN PyObject *_wrap_IntensityFunctionSqrt_clone(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntensityFunctionSqrt_clone" "', argument " "1"" of type '" "IntensityFunctionSqrt const *""'"); } arg1 = reinterpret_cast< IntensityFunctionSqrt * >(argp1); - result = (IntensityFunctionSqrt *)((IntensityFunctionSqrt const *)arg1)->clone(); + { + try { + result = (IntensityFunctionSqrt *)((IntensityFunctionSqrt const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntensityFunctionSqrt, 0 | 0 ); return resultobj; fail: @@ -34680,7 +37550,17 @@ SWIGINTERN PyObject *_wrap_IntensityFunctionSqrt_evaluate(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntensityFunctionSqrt_evaluate" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - result = (double)((IntensityFunctionSqrt const *)arg1)->evaluate(arg2); + { + try { + result = (double)((IntensityFunctionSqrt const *)arg1)->evaluate(arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -34693,7 +37573,17 @@ SWIGINTERN PyObject *_wrap_new_IntensityFunctionSqrt(PyObject *self, PyObject *a IntensityFunctionSqrt *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_IntensityFunctionSqrt", 0, 0, 0)) SWIG_fail; - result = (IntensityFunctionSqrt *)new IntensityFunctionSqrt(); + { + try { + result = (IntensityFunctionSqrt *)new IntensityFunctionSqrt(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntensityFunctionSqrt, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34715,7 +37605,17 @@ SWIGINTERN PyObject *_wrap_delete_IntensityFunctionSqrt(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntensityFunctionSqrt" "', argument " "1"" of type '" "IntensityFunctionSqrt *""'"); } arg1 = reinterpret_cast< IntensityFunctionSqrt * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34748,7 +37648,17 @@ SWIGINTERN PyObject *_wrap_delete_IChiSquaredModule(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IChiSquaredModule" "', argument " "1"" of type '" "IChiSquaredModule *""'"); } arg1 = reinterpret_cast< IChiSquaredModule * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34771,7 +37681,17 @@ SWIGINTERN PyObject *_wrap_IChiSquaredModule_clone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChiSquaredModule_clone" "', argument " "1"" of type '" "IChiSquaredModule const *""'"); } arg1 = reinterpret_cast< IChiSquaredModule * >(argp1); - result = (IChiSquaredModule *)((IChiSquaredModule const *)arg1)->clone(); + { + try { + result = (IChiSquaredModule *)((IChiSquaredModule const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IChiSquaredModule, 0 | 0 ); return resultobj; fail: @@ -34794,7 +37714,17 @@ SWIGINTERN PyObject *_wrap_IChiSquaredModule_varianceFunction(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChiSquaredModule_varianceFunction" "', argument " "1"" of type '" "IChiSquaredModule const *""'"); } arg1 = reinterpret_cast< IChiSquaredModule * >(argp1); - result = (IVarianceFunction *)((IChiSquaredModule const *)arg1)->varianceFunction(); + { + try { + result = (IVarianceFunction *)((IChiSquaredModule const *)arg1)->varianceFunction(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IVarianceFunction, 0 | 0 ); return resultobj; fail: @@ -34826,7 +37756,17 @@ SWIGINTERN PyObject *_wrap_IChiSquaredModule_setVarianceFunction(PyObject *self, SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IChiSquaredModule_setVarianceFunction" "', argument " "2"" of type '" "IVarianceFunction const &""'"); } arg2 = reinterpret_cast< IVarianceFunction * >(argp2); - (arg1)->setVarianceFunction((IVarianceFunction const &)*arg2); + { + try { + (arg1)->setVarianceFunction((IVarianceFunction const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34849,7 +37789,17 @@ SWIGINTERN PyObject *_wrap_IChiSquaredModule_getIntensityFunction(PyObject *self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IChiSquaredModule_getIntensityFunction" "', argument " "1"" of type '" "IChiSquaredModule const *""'"); } arg1 = reinterpret_cast< IChiSquaredModule * >(argp1); - result = (IIntensityFunction *)((IChiSquaredModule const *)arg1)->getIntensityFunction(); + { + try { + result = (IIntensityFunction *)((IChiSquaredModule const *)arg1)->getIntensityFunction(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IIntensityFunction, 0 | 0 ); return resultobj; fail: @@ -34881,7 +37831,17 @@ SWIGINTERN PyObject *_wrap_IChiSquaredModule_setIntensityFunction(PyObject *self SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IChiSquaredModule_setIntensityFunction" "', argument " "2"" of type '" "IIntensityFunction const &""'"); } arg2 = reinterpret_cast< IIntensityFunction * >(argp2); - (arg1)->setIntensityFunction((IIntensityFunction const &)*arg2); + { + try { + (arg1)->setIntensityFunction((IIntensityFunction const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -34927,7 +37887,17 @@ SWIGINTERN PyObject *_wrap_IChiSquaredModule_residual(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IChiSquaredModule_residual" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (double)(arg1)->residual(arg2,arg3,arg4); + { + try { + result = (double)(arg1)->residual(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -34947,7 +37917,17 @@ SWIGINTERN PyObject *_wrap_new_ChiSquaredModule__SWIG_0(PyObject *self, Py_ssize ChiSquaredModule *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (ChiSquaredModule *)new ChiSquaredModule(); + { + try { + result = (ChiSquaredModule *)new ChiSquaredModule(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChiSquaredModule, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -34971,7 +37951,17 @@ SWIGINTERN PyObject *_wrap_new_ChiSquaredModule__SWIG_1(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChiSquaredModule" "', argument " "1"" of type '" "ChiSquaredModule const &""'"); } arg1 = reinterpret_cast< ChiSquaredModule * >(argp1); - result = (ChiSquaredModule *)new ChiSquaredModule((ChiSquaredModule const &)*arg1); + { + try { + result = (ChiSquaredModule *)new ChiSquaredModule((ChiSquaredModule const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChiSquaredModule, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35022,7 +38012,17 @@ SWIGINTERN PyObject *_wrap_delete_ChiSquaredModule(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ChiSquaredModule" "', argument " "1"" of type '" "ChiSquaredModule *""'"); } arg1 = reinterpret_cast< ChiSquaredModule * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35045,7 +38045,17 @@ SWIGINTERN PyObject *_wrap_ChiSquaredModule_clone(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChiSquaredModule_clone" "', argument " "1"" of type '" "ChiSquaredModule const *""'"); } arg1 = reinterpret_cast< ChiSquaredModule * >(argp1); - result = (ChiSquaredModule *)((ChiSquaredModule const *)arg1)->clone(); + { + try { + result = (ChiSquaredModule *)((ChiSquaredModule const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChiSquaredModule, 0 | 0 ); return resultobj; fail: @@ -35091,7 +38101,17 @@ SWIGINTERN PyObject *_wrap_ChiSquaredModule_residual(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ChiSquaredModule_residual" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - result = (double)(arg1)->residual(arg2,arg3,arg4); + { + try { + result = (double)(arg1)->residual(arg2,arg3,arg4); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35124,7 +38144,17 @@ SWIGINTERN PyObject *_wrap_delete_IVarianceFunction(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVarianceFunction" "', argument " "1"" of type '" "IVarianceFunction *""'"); } arg1 = reinterpret_cast< IVarianceFunction * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35147,7 +38177,17 @@ SWIGINTERN PyObject *_wrap_IVarianceFunction_clone(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVarianceFunction_clone" "', argument " "1"" of type '" "IVarianceFunction const *""'"); } arg1 = reinterpret_cast< IVarianceFunction * >(argp1); - result = (IVarianceFunction *)((IVarianceFunction const *)arg1)->clone(); + { + try { + result = (IVarianceFunction *)((IVarianceFunction const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IVarianceFunction, 0 | 0 ); return resultobj; fail: @@ -35185,7 +38225,17 @@ SWIGINTERN PyObject *_wrap_IVarianceFunction_variance(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IVarianceFunction_variance" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((IVarianceFunction const *)arg1)->variance(arg2,arg3); + { + try { + result = (double)((IVarianceFunction const *)arg1)->variance(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35215,7 +38265,17 @@ SWIGINTERN PyObject *_wrap_VarianceConstantFunction_clone(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarianceConstantFunction_clone" "', argument " "1"" of type '" "VarianceConstantFunction const *""'"); } arg1 = reinterpret_cast< VarianceConstantFunction * >(argp1); - result = (VarianceConstantFunction *)((VarianceConstantFunction const *)arg1)->clone(); + { + try { + result = (VarianceConstantFunction *)((VarianceConstantFunction const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VarianceConstantFunction, 0 | 0 ); return resultobj; fail: @@ -35253,7 +38313,17 @@ SWIGINTERN PyObject *_wrap_VarianceConstantFunction_variance(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VarianceConstantFunction_variance" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((VarianceConstantFunction const *)arg1)->variance(arg2,arg3); + { + try { + result = (double)((VarianceConstantFunction const *)arg1)->variance(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35266,7 +38336,17 @@ SWIGINTERN PyObject *_wrap_new_VarianceConstantFunction(PyObject *self, PyObject VarianceConstantFunction *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "new_VarianceConstantFunction", 0, 0, 0)) SWIG_fail; - result = (VarianceConstantFunction *)new VarianceConstantFunction(); + { + try { + result = (VarianceConstantFunction *)new VarianceConstantFunction(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VarianceConstantFunction, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35288,7 +38368,17 @@ SWIGINTERN PyObject *_wrap_delete_VarianceConstantFunction(PyObject *self, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VarianceConstantFunction" "', argument " "1"" of type '" "VarianceConstantFunction *""'"); } arg1 = reinterpret_cast< VarianceConstantFunction * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35320,7 +38410,17 @@ SWIGINTERN PyObject *_wrap_new_VarianceSimFunction__SWIG_0(PyObject *self, Py_ss SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VarianceSimFunction" "', argument " "1"" of type '" "double""'"); } arg1 = static_cast< double >(val1); - result = (VarianceSimFunction *)new VarianceSimFunction(arg1); + { + try { + result = (VarianceSimFunction *)new VarianceSimFunction(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VarianceSimFunction, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35333,7 +38433,17 @@ SWIGINTERN PyObject *_wrap_new_VarianceSimFunction__SWIG_1(PyObject *self, Py_ss VarianceSimFunction *result = 0 ; if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (VarianceSimFunction *)new VarianceSimFunction(); + { + try { + result = (VarianceSimFunction *)new VarianceSimFunction(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VarianceSimFunction, SWIG_POINTER_NEW | 0 ); return resultobj; fail: @@ -35387,7 +38497,17 @@ SWIGINTERN PyObject *_wrap_VarianceSimFunction_clone(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VarianceSimFunction_clone" "', argument " "1"" of type '" "VarianceSimFunction const *""'"); } arg1 = reinterpret_cast< VarianceSimFunction * >(argp1); - result = (VarianceSimFunction *)((VarianceSimFunction const *)arg1)->clone(); + { + try { + result = (VarianceSimFunction *)((VarianceSimFunction const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VarianceSimFunction, 0 | 0 ); return resultobj; fail: @@ -35425,7 +38545,17 @@ SWIGINTERN PyObject *_wrap_VarianceSimFunction_variance(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VarianceSimFunction_variance" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); - result = (double)((VarianceSimFunction const *)arg1)->variance(arg2,arg3); + { + try { + result = (double)((VarianceSimFunction const *)arg1)->variance(arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -35447,7 +38577,17 @@ SWIGINTERN PyObject *_wrap_delete_VarianceSimFunction(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VarianceSimFunction" "', argument " "1"" of type '" "VarianceSimFunction *""'"); } arg1 = reinterpret_cast< VarianceSimFunction * >(argp1); - delete arg1; + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } resultobj = SWIG_Py_Void(); return resultobj; fail: