Exception: Nodo::JavaScriptError
- Defined in:
- lib/nodo/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(attributes = {}, function = nil) ⇒ JavaScriptError
constructor
A new instance of JavaScriptError.
- #to_s ⇒ Object
Constructor Details
#initialize(attributes = {}, function = nil) ⇒ JavaScriptError
Returns a new instance of JavaScriptError.
14 15 16 17 18 19 20 21 |
# File 'lib/nodo/errors.rb', line 14 def initialize(attributes = {}, function = nil) @attributes = attributes || {} if backtrace = generate_backtrace(attributes['stack']) backtrace.unshift function.source_location if function && function.source_location set_backtrace backtrace end @message = end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
12 13 14 |
# File 'lib/nodo/errors.rb', line 12 def attributes @attributes end |
Instance Method Details
#to_s ⇒ Object
23 24 25 |
# File 'lib/nodo/errors.rb', line 23 def to_s @message end |