inline pic_try/pic_catch in with_exception_handler
This commit is contained in:
@@ -180,10 +180,16 @@ pic_error_with_exception_handler(pic_state *pic)
|
|||||||
|
|
||||||
pic_get_args(pic, "ll", &handler, &thunk);
|
pic_get_args(pic, "ll", &handler, &thunk);
|
||||||
|
|
||||||
pic_try_with_handler(handler) {
|
pic_push_try(pic, handler);
|
||||||
|
if (setjmp(*pic->jmp) == 0) {
|
||||||
|
|
||||||
val = pic_apply0(pic, thunk);
|
val = pic_apply0(pic, thunk);
|
||||||
|
|
||||||
|
pic_pop_try(pic);
|
||||||
}
|
}
|
||||||
pic_catch {
|
else {
|
||||||
|
pic_pop_try(pic);
|
||||||
|
|
||||||
pic_value e = pic->err;
|
pic_value e = pic->err;
|
||||||
|
|
||||||
pic->err = pic_undef_value();
|
pic->err = pic_undef_value();
|
||||||
|
|||||||
Reference in New Issue
Block a user