class JS::Error
A wrapper class for JavaScript Error
to allow the Error
to be thrown in Ruby.
Public Class Methods
new(exception)
click to toggle source
Calls superclass method
# File packages/gems/js/lib/js.rb, line 282 def initialize(exception) @exception = exception super end
Public Instance Methods
message()
click to toggle source
# File packages/gems/js/lib/js.rb, line 287 def message stack = @exception[:stack] if stack.typeof == "string" # Error.stack contains the error message also stack.to_s else @exception.to_s end end