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:
parent
adec237865
commit
2e897ce011
1 changed files with 6 additions and 0 deletions
|
@ -81,6 +81,11 @@ namespace {
|
|||
TryCatch *tc = unwrap(self);
|
||||
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() {
|
||||
|
@ -90,5 +95,6 @@ void rr_init_v8_try_catch() {
|
|||
rr_define_method(TryCatchClass, "Exception", _Exception, 0);
|
||||
rr_define_method(TryCatchClass, "StackTrace", StackTrace, 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"));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue