Arrange to return after calling zend_throw_exception()

Fixes github issue#240.
This commit is contained in:
Olly Betts 2014-12-09 09:43:31 +13:00
commit 26bbc96d58
6 changed files with 133 additions and 1 deletions

View file

@ -1000,6 +1000,7 @@ public:
Delete(tm);
}
Printf(f->code, "thrown:\n");
Printf(f->code, "return;\n");
/* Error handling code */
@ -2356,6 +2357,7 @@ done:
Append(f->code, actioncode);
Delete(actioncode);
Printf(f->code, "thrown:\n");
Append(f->code, "return;\n");
Append(f->code, "fail:\n");
Append(f->code, "SWIG_FAIL(TSRMLS_C);\n");
@ -2715,6 +2717,7 @@ done:
Delete(outarg);
}
Append(w->code, "thrown:\n");
if (!is_void) {
if (!(ignored_method && !pure_virtual)) {
String *rettype = SwigType_str(returntype, 0);