Exception: Kwaff::ParseError
- Inherits:
-
KwaffError
- Object
- StandardError
- KwaffError
- Kwaff::ParseError
- Defined in:
- lib/kwaff/parser.rb
Instance Method Summary collapse
-
#initialize(msg, parser) ⇒ ParseError
constructor
A new instance of ParseError.
- #to_s ⇒ Object
Constructor Details
#initialize(msg, parser) ⇒ ParseError
Returns a new instance of ParseError.
17 18 19 20 |
# File 'lib/kwaff/parser.rb', line 17 def initialize(msg, parser) super(msg) @parser = parser end |
Instance Method Details
#to_s ⇒ Object
22 23 24 25 26 |
# File 'lib/kwaff/parser.rb', line 22 def to_s index = @parser.index line = @parser.lines[index] super() + " - (line #{index + 1}: #{line.inspect})\n" end |