class V8::JSError

def syntax_error?(try)

in the TryCatch. Is there a better way to detect a syntax error
in these instances, we have to pull it out of the Message object
but it does not contain any source location information, so
Syntax errors are weird in that they have a non-empty stack trace
def syntax_error?(try)
  ex = @to.rb(try.Exception())
  if ex && ex.kind_of?(V8::Object)
    type = ex["constructor"]
    type && type.kind_of?(V8::Function) && type.name == "SyntaxError"
  else
    false
  end
end