kkaempf / swig-issues

Issues from SWIG (testing)
0 stars 0 forks source link

feature,python,exceptions: append exception text #108

Open SwigAtSF opened 11 years ago

SwigAtSF commented 11 years ago

C++ member function prototype bool load_data(const char* path) throw(std::bad_alloc);

resulting snippet of SWIG generated code: try { result = (bool)(arg1)->load_data((char const *)arg2);

} catch(std::bad_alloc &_e) { { PyErr_SetString(PyExc_RuntimeError,"std::bad_alloc"); SWIG_fail; } }

Perhaps it is possible to concatenate _e.what() with the existing string label ("std::bad_alloc")?