Class: RDF::N3::Reader::SyntaxError
- Inherits:
-
ReaderError
- Object
- ReaderError
- RDF::N3::Reader::SyntaxError
- Defined in:
- lib/rdf/n3/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.
977 978 979 980 981 982 |
# File 'lib/rdf/n3/reader.rb', line 977 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.
967 968 969 |
# File 'lib/rdf/n3/reader.rb', line 967 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
955 956 957 |
# File 'lib/rdf/n3/reader.rb', line 955 def production @production end |
#token ⇒ String (readonly)
The invalid token which triggered the error.
961 962 963 |
# File 'lib/rdf/n3/reader.rb', line 961 def token @token end |