Exception: ShEx::ParseError
Overview
Indicates bad syntax found in LD Patch document
Instance Attribute Summary collapse
-
#lineno ⇒ Integer
readonly
The line number where the error occurred.
-
#token ⇒ String
readonly
The invalid token which triggered the error.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message, options = {}) ⇒ ParseError
constructor
Initializes a new parser error instance.
Constructor Details
#initialize(message, options = {}) ⇒ ParseError
Initializes a new parser error instance.
127 128 129 130 131 |
# File 'lib/shex.rb', line 127 def initialize(, = {}) @token = [:token] @lineno = [:lineno] || (@token.lineno if @token.respond_to?(:lineno)) super(.to_s, code: .fetch(:code, 400)) end |
Instance Attribute Details
#lineno ⇒ Integer (readonly)
The line number where the error occurred.
117 118 119 |
# File 'lib/shex.rb', line 117 def lineno @lineno end |
#token ⇒ String (readonly)
The invalid token which triggered the error.
111 112 113 |
# File 'lib/shex.rb', line 111 def token @token end |