Exception: Odin::Errors::ParseError
- Defined in:
- lib/odin/types/errors.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Attributes inherited from OdinError
Instance Method Summary collapse
-
#initialize(code, line, column, detail = nil) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(code, line, column, detail = nil) ⇒ ParseError
Returns a new instance of ParseError.
101 102 103 104 105 106 107 108 |
# File 'lib/odin/types/errors.rb', line 101 def initialize(code, line, column, detail = nil) @line = line @column = column msg = ParseErrorCode.(code) msg = "#{msg}: #{detail}" if detail msg = "#{msg} at line #{line}, column #{column}" super(code, msg) end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
99 100 101 |
# File 'lib/odin/types/errors.rb', line 99 def column @column end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
99 100 101 |
# File 'lib/odin/types/errors.rb', line 99 def line @line end |