Issue 145: decrement exception object prior to returning.

This commit is contained in:
Trevor Highland
2017-07-26 20:17:52 -05:00
parent 98b5ed837b
commit 4435c60872

View File

@@ -66,6 +66,7 @@ void reraise_kj_exception() {
catch (kj::Exception& exn) {
auto obj = wrap_kj_exception_for_reraise(exn);
PyErr_SetObject((PyObject*)obj->ob_type, obj);
Py_DECREF(obj);
}
catch (const std::exception& exn) {
PyErr_SetString(PyExc_RuntimeError, exn.what());