Exception: ShEx::NotSatisfied

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

Overview

Shape expectation not satisfied

Instance Attribute Summary collapse

Attributes inherited from Error

#code

Instance Method Summary collapse

Constructor Details

#initialize(message, expression: self) ⇒ NotSatisfied

Initializes a new parser error instance.

Parameters:



144
145
146
147
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shex-f64040a493d0/lib/shex.rb', line 144

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

Instance Attribute Details

#expressionShEx::Algebra::ShapeExpression (readonly)

The expression which was not satified



137
138
139
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shex-f64040a493d0/lib/shex.rb', line 137

def expression
  @expression
end

Instance Method Details

#inspectObject



149
150
151
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shex-f64040a493d0/lib/shex.rb', line 149

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