Exception: NestedText::Errors::ParseError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line, colno, message) ⇒ ParseError

Returns a new instance of ParseError.



19
20
21
22
23
24
25
26
# File 'lib/nestedtext/errors_internal.rb', line 19

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.



17
18
19
# File 'lib/nestedtext/errors_internal.rb', line 17

def colno
  @colno
end

#linenoObject (readonly)

Returns the value of attribute lineno.



17
18
19
# File 'lib/nestedtext/errors_internal.rb', line 17

def lineno
  @lineno
end

#message_rawObject (readonly)

Returns the value of attribute message_raw.



17
18
19
# File 'lib/nestedtext/errors_internal.rb', line 17

def message_raw
  @message_raw
end