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.
9 10 11 12 13 14 15 16 |
# File 'lib/nodo/errors.rb', line 9 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 = end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/nodo/errors.rb', line 7 def attributes @attributes end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/nodo/errors.rb', line 18 def to_s end |