Exception: Kwaff::ParseError

Inherits:
KwaffError
  • Object
show all
Defined in:
lib/kwaff/parser.rb

Instance Method Summary collapse

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_sObject



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