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

fix error handling now that handles are properly applied to stack frames.

This commit is contained in:
Charles Lowell 2011-04-26 12:00:55 -05:00
parent 45b53341e2
commit 2c4d294bf1

View file

@ -106,7 +106,7 @@ module V8
#in these instances, we have to pull it out of the Message object
#in the TryCatch. Is there a better way to detect a syntax error
def syntax_error?(try)
ex = try.Exception()
ex = @to.rb(try.Exception())
if ex && ex.kind_of?(V8::Object)
type = ex["constructor"]
type && type.kind_of?(V8::Function) && type.name == "SyntaxError"