Exception: SystemRDL::ParseError

Inherits:
Error
  • Object
show all
Defined in:
lib/systemrdl/error.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#error_message

Instance Method Summary collapse

Constructor Details

#initialize(message, position) ⇒ ParseError

Returns a new instance of ParseError.



14
15
16
17
# File 'lib/systemrdl/error.rb', line 14

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

Instance Attribute Details

#positionObject (readonly)

Returns the value of attribute position.



19
20
21
# File 'lib/systemrdl/error.rb', line 19

def position
  @position
end

Instance Method Details

#to_sObject



21
22
23
# File 'lib/systemrdl/error.rb', line 21

def to_s
  (@position && "#{super} -- #{@position}") || super
end