File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ find_package(ElementsProject)
66#---------------------------------------------------------------
77
88# Declare project name and version
9- elements_project(SourceXtractorPlusPlus 0.19 USE Alexandria 2.27 DESCRIPTION "SourceXtractor++, the next generation SExtractor" )
9+ elements_project(SourceXtractorPlusPlus 0.19 USE Alexandria 2.28 DESCRIPTION "SourceXtractor++, the next generation SExtractor" )
Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ struct std_duration_from_timedelta {
104104 }
105105};
106106
107+ void translate_pyston_exc (const Pyston::Exception& exc) {
108+ exc.restore ();
109+ }
110+
107111} // namespace
108112
109113BOOST_PYTHON_MODULE (_SEPythonModule) {
@@ -206,6 +210,9 @@ BOOST_PYTHON_MODULE(_SEPythonModule) {
206210 // For custom segmentation
207211 py::def (" AllFramesDone" , &AllFramesDone::create);
208212
213+ // Pyston::Exception wrap Python errors, so unwrap them at the Python boundary
214+ py::register_exception_translator<Pyston::Exception>(&translate_pyston_exc);
215+
209216 // Import pyston into the interpreter so it is importable without tweaking PYTHONPATH
210217#if PY_MAJOR_VERSION >= 3
211218 PyObject* pyston = PyInit_pyston ();
You can’t perform that action at this time.
0 commit comments