1
0
Fork 0
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:
Joshua Peek 2012-05-20 12:20:56 -05:00
parent 468f32bcbc
commit f061eae84e

View file

@ -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