Exception: NestedText::Errors::ParseError

Inherits:
InternalError show all
Defined in:
lib/nestedtext/errors.rb

Overview

TODO: rename all Subclasses to ParseXError, just like for Dump

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line, colno, message) ⇒ ParseError

Returns a new instance of ParseError.



24
25
26
27
28
29
30
31
# File 'lib/nestedtext/errors.rb', line 24

def initialize(line, colno, message)
  # Note, both line and column number are 0-indexed.
  # But for human display we make them 1-indexed.
  @lineno = line.lineno
  @colno = colno
  @message_raw = message
  super(pretty_message(line))
end

Instance Attribute Details

#colnoObject (readonly)

Returns the value of attribute colno.



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

def colno
  @colno
end

#linenoObject (readonly)

Returns the value of attribute lineno.



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

def lineno
  @lineno
end

#message_rawObject (readonly)

Returns the value of attribute message_raw.



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

def message_raw
  @message_raw
end