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

pickup rename JavascriptError -> JSError in shell.

This commit is contained in:
Charles Lowell 2010-06-15 23:04:50 +03:00
parent 2e7f3e1358
commit dce8dd027e

View file

@ -52,8 +52,9 @@ module V8
def self.load(cxt, libfile)
begin
cxt.load(libfile)
rescue V8::JavascriptError => e
puts e.javascript_stacktrace
rescue V8::JSError => e
puts e.message
puts e.backtrace(:javascript)
rescue StandardError => e
puts e
end
@ -87,10 +88,12 @@ module V8
begin
result = cxt.eval(line, '<shell>')
puts(result) unless result.nil?
rescue V8::JavascriptError => e
puts e.javascript_stacktrace
rescue V8::JSError => e
puts e.message
puts e.backtrace(:javascript)
rescue StandardError => e
puts e
puts e.backtrace.join("\n")
end
end
end
@ -99,15 +102,11 @@ module V8
def to_s
"[object Shell]"
end
def print(string)
puts string
end
def evalrb(src)
eval(src)
end
def exit(status = 0)
Kernel.exit(status)
end