lib/execjs/ruby_rhino_runtime.rb in execjs-0.4.0 vs lib/execjs/ruby_rhino_runtime.rb in execjs-1.0.0

- old
+ new

@@ -20,22 +20,22 @@ if /\S/ =~ source unbox @rhino_context.eval("(#{source})") end rescue ::Rhino::JavascriptError => e if e.message == "syntax error" - raise RuntimeError, e + raise RuntimeError, e.message else - raise ProgramError, e + raise ProgramError, e.message end end def call(properties, *args) unbox @rhino_context.eval(properties).call(*args) rescue ::Rhino::JavascriptError => e if e.message == "syntax error" - raise RuntimeError, e + raise RuntimeError, e.message else - raise ProgramError, e + raise ProgramError, e.message end end def unbox(value) case value