1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

add CanContinue() method to TryCatch

This commit is contained in:
Charles Lowell 2010-05-18 16:15:51 +03:00
parent adec237865
commit 2e897ce011

View file

@ -81,6 +81,11 @@ namespace {
TryCatch *tc = unwrap(self); TryCatch *tc = unwrap(self);
return tc ? rr_v82rb(tc->Message()) : Qnil; return tc ? rr_v82rb(tc->Message()) : Qnil;
} }
VALUE CanContinue(VALUE self) {
TryCatch *tc = unwrap(self);
return tc ? rr_v82rb(tc->CanContinue()) : Qnil;
}
} }
void rr_init_v8_try_catch() { void rr_init_v8_try_catch() {
@ -90,5 +95,6 @@ void rr_init_v8_try_catch() {
rr_define_method(TryCatchClass, "Exception", _Exception, 0); rr_define_method(TryCatchClass, "Exception", _Exception, 0);
rr_define_method(TryCatchClass, "StackTrace", StackTrace, 0); rr_define_method(TryCatchClass, "StackTrace", StackTrace, 0);
rr_define_method(TryCatchClass, "Message", _Message, 0); rr_define_method(TryCatchClass, "Message", _Message, 0);
rr_define_method(TryCatchClass, "CanContinue", CanContinue, 0);
rb_funcall(TryCatchClass, rb_intern("private_class_method"), 1, rb_str_new2("new")); rb_funcall(TryCatchClass, rb_intern("private_class_method"), 1, rb_str_new2("new"));
} }