Exception: Jass::JavaScriptError

Inherits:
Error
  • Object
show all
Defined in:
lib/jass/errors.rb

Direct Known Subclasses

DependencyError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ JavaScriptError

Returns a new instance of JavaScriptError.



7
8
9
10
11
12
# File 'lib/jass/errors.rb', line 7

def initialize(attributes = {})
  @attributes = attributes || {}
  if stack = attributes['stack']
    set_backtrace stack.split("\n")
  end
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/jass/errors.rb', line 5

def attributes
  @attributes
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/jass/errors.rb', line 14

def to_s
  generate_message
end