Skip to content

Commit

Permalink
Exception category should default to catch.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Dec 5, 2013
1 parent 9bb18f5 commit bd782aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/exceptions.c
Expand Up @@ -394,6 +394,8 @@ void MVM_exception_throwobj(MVMThreadContext *tc, MVMuint8 mode, MVMObject *ex_o
else
MVM_exception_throw_adhoc(tc, "Can only throw an exception object");

if (!ex->body.category)
ex->body.category = MVM_EX_CAT_CATCH;
lh = search_for_handler_from(tc, tc->cur_frame, mode, ex->body.category);
if (lh.frame == NULL)
panic_unhandled_ex(tc, ex);
Expand Down

0 comments on commit bd782aa

Please sign in to comment.