Exception: SystemRDL::EvaluationError
- Defined in:
- lib/systemrdl/error.rb
Instance Attribute Summary collapse
-
#token_ranges ⇒ Object
readonly
Returns the value of attribute token_ranges.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message, *token_ranges) ⇒ EvaluationError
constructor
A new instance of EvaluationError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, *token_ranges) ⇒ EvaluationError
Returns a new instance of EvaluationError.
35 36 37 38 |
# File 'lib/systemrdl/error.rb', line 35 def initialize(, *token_ranges) super() @token_ranges = token_ranges.compact end |
Instance Attribute Details
#token_ranges ⇒ Object (readonly)
Returns the value of attribute token_ranges.
40 41 42 |
# File 'lib/systemrdl/error.rb', line 40 def token_ranges @token_ranges end |
Instance Method Details
#to_s ⇒ Object
42 43 44 45 |
# File 'lib/systemrdl/error.rb', line 42 def to_s position = token_ranges.first&.head&.position (position && "#{super} -- #{position}") || super end |