Merge pull request #158 from tsh56/develop
Closes #145: decrement exception object prior to returning.
This commit is contained in:
@@ -66,6 +66,7 @@ void reraise_kj_exception() {
|
|||||||
catch (kj::Exception& exn) {
|
catch (kj::Exception& exn) {
|
||||||
auto obj = wrap_kj_exception_for_reraise(exn);
|
auto obj = wrap_kj_exception_for_reraise(exn);
|
||||||
PyErr_SetObject((PyObject*)obj->ob_type, obj);
|
PyErr_SetObject((PyObject*)obj->ob_type, obj);
|
||||||
|
Py_DECREF(obj);
|
||||||
}
|
}
|
||||||
catch (const std::exception& exn) {
|
catch (const std::exception& exn) {
|
||||||
PyErr_SetString(PyExc_RuntimeError, exn.what());
|
PyErr_SetString(PyExc_RuntimeError, exn.what());
|
||||||
|
|||||||
Reference in New Issue
Block a user