mirror of
https://github.com/rails/execjs
synced 2023-03-27 23:21:20 -04:00
Use therubyracer e.value over e.message
This commit is contained in:
parent
468f32bcbc
commit
f061eae84e
1 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ module ExecJS
|
|||
unbox @v8_context.eval("(#{source})")
|
||||
rescue ::V8::JSError => e
|
||||
if e.value["name"] == "SyntaxError"
|
||||
raise RuntimeError, e.message
|
||||
raise RuntimeError, e.value.to_s
|
||||
else
|
||||
raise ProgramError, e.value.to_s
|
||||
end
|
||||
|
@ -44,9 +44,9 @@ module ExecJS
|
|||
unbox @v8_context.eval(properties).call(*args)
|
||||
rescue ::V8::JSError => e
|
||||
if e.value["name"] == "SyntaxError"
|
||||
raise RuntimeError, e.message
|
||||
raise RuntimeError, e.value.to_s
|
||||
else
|
||||
raise ProgramError, e.message
|
||||
raise ProgramError, e.value.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue