Exception: NameError

Inherits:
StandardError show all
Defined in:
opal/opal/corelib/error.rb,
opal/opal/corelib/error.rb

Direct Known Subclasses

NoMethodError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Exception

#backtrace, #backtrace_locations, #cause, exception, #exception, #full_message, #inspect, #message, new, #set_backtrace, #to_s

Constructor Details

#initialize(message, name = nil) ⇒ NameError

Returns a new instance of NameError.



259
260
261
262
# File 'opal/opal/corelib/error.rb', line 259

def initialize(message, name = nil)
  super message
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



257
258
259
# File 'opal/opal/corelib/error.rb', line 257

def name
  @name
end