Exception: RubyRunJs::JsException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ruby_run_js/objects/js_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, msg, throw_value) ⇒ JsException

Returns a new instance of JsException.



8
9
10
11
12
# File 'lib/ruby_run_js/objects/js_exception.rb', line 8

def initialize(type, msg, throw_value)
  @type = type
  @msg = msg
  @throw_value = throw_value
end

Instance Attribute Details

#msgObject (readonly)

Returns the value of attribute msg.



6
7
8
# File 'lib/ruby_run_js/objects/js_exception.rb', line 6

def msg
  @msg
end

#throw_valueObject (readonly)

Returns the value of attribute throw_value.



6
7
8
# File 'lib/ruby_run_js/objects/js_exception.rb', line 6

def throw_value
  @throw_value
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/ruby_run_js/objects/js_exception.rb', line 6

def type
  @type
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/ruby_run_js/objects/js_exception.rb', line 14

def to_s
  "#{@type}: #{@msg}"
end