Exception: Mirah::MirahError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mirah/errors.rb

Direct Known Subclasses

NodeError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, position = nil) ⇒ MirahError

Returns a new instance of MirahError.



21
22
23
24
# File 'lib/mirah/errors.rb', line 21

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

Instance Attribute Details

#causeObject

Returns the value of attribute cause.



19
20
21
# File 'lib/mirah/errors.rb', line 19

def cause
  @cause
end

#positionObject

Returns the value of attribute position.



18
19
20
# File 'lib/mirah/errors.rb', line 18

def position
  @position
end

Instance Method Details

#inspectObject



26
27
28
# File 'lib/mirah/errors.rb', line 26

def inspect
  "MirahError: #{message} #{position}"
end