Exception: OpenEHR::AQL::ParseError
- Defined in:
- lib/openehr/aql/errors.rb
Overview
Raised by the Lexer/Parser on malformed AQL source. Carries the 1-based line/column of the offending token so the message can point at the exact spot, e.g. "line 2, column 8: ...".
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(message, line: nil, column: nil) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(message, line: nil, column: nil) ⇒ ParseError
Returns a new instance of ParseError.
14 15 16 17 18 19 |
# File 'lib/openehr/aql/errors.rb', line 14 def initialize(, line: nil, column: nil) @line = line @column = column location = line && column ? " (line #{line}, column #{column})" : '' super("#{}#{location}") end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
12 13 14 |
# File 'lib/openehr/aql/errors.rb', line 12 def column @column end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
12 13 14 |
# File 'lib/openehr/aql/errors.rb', line 12 def line @line end |