Exception: ShEx::NotMatched

Inherits:
Error show all
Defined in:
vendor/bundler/ruby/3.3.0/bundler/gems/shex-f64040a493d0/lib/shex.rb

Overview

TripleExpression did not match

Instance Attribute Summary collapse

Attributes inherited from Error

#code

Instance Method Summary collapse

Constructor Details

#initialize(message, expression: self) ⇒ NotMatched

Initializes a new parser error instance.

Parameters:



166
167
168
169
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shex-f64040a493d0/lib/shex.rb', line 166

def initialize(message, expression: self)
  @expression = expression
  super(message.to_s)
end

Instance Attribute Details

#expressionShEx::Algebra::TripleExpression (readonly)

The expression which was not satified



159
160
161
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shex-f64040a493d0/lib/shex.rb', line 159

def expression
  @expression
end

Instance Method Details

#inspectObject



171
172
173
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shex-f64040a493d0/lib/shex.rb', line 171

def inspect
  super + (expression ? SXP::Generator.string(expression.to_sxp_bin) : '')
end