Class: RDF::Turtle::Reader::SyntaxError
- Inherits:
-
ReaderError
- Object
- ReaderError
- RDF::Turtle::Reader::SyntaxError
- Defined in:
- lib/rdf/turtle/reader.rb
Instance Attribute Summary collapse
-
#lineno ⇒ Integer
readonly
The line number where the error occurred.
-
#production ⇒ Symbol
readonly
The current production.
-
#token ⇒ String
readonly
The invalid token which triggered the error.
Instance Method Summary collapse
-
#initialize(message, **options) ⇒ SyntaxError
constructor
Initializes a new syntax error instance.
Constructor Details
#initialize(message, **options) ⇒ SyntaxError
Initializes a new syntax error instance.
686 687 688 689 690 691 |
# File 'lib/rdf/turtle/reader.rb', line 686 def initialize(, **) @production = [:production] @token = [:token] @lineno = [:lineno] || (@token.lineno if @token.respond_to?(:lineno)) super(.to_s) end |
Instance Attribute Details
#lineno ⇒ Integer (readonly)
The line number where the error occurred.
676 677 678 |
# File 'lib/rdf/turtle/reader.rb', line 676 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
664 665 666 |
# File 'lib/rdf/turtle/reader.rb', line 664 def production @production end |
#token ⇒ String (readonly)
The invalid token which triggered the error.
670 671 672 |
# File 'lib/rdf/turtle/reader.rb', line 670 def token @token end |