Exception: ToonFormat::ParseError

Inherits:
DecodeError show all
Defined in:
lib/toon_format/errors.rb

Overview

Raised when parsing encounters syntax errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, line: nil, column: nil) ⇒ ParseError

Returns a new instance of ParseError.



20
21
22
23
24
# File 'lib/toon_format/errors.rb', line 20

def initialize(message, line: nil, column: nil)
  @line_number = line
  @column = column
  super(format_message(message))
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



18
19
20
# File 'lib/toon_format/errors.rb', line 18

def column
  @column
end

#line_numberObject (readonly)

Returns the value of attribute line_number.



18
19
20
# File 'lib/toon_format/errors.rb', line 18

def line_number
  @line_number
end