Exception: ShEx::NotMatched

Inherits:
Error
  • Object
show all
Defined in:
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:

  • message (String, #to_s)
  • expression (Satisfiable) (defaults to: self)

    (self)



162
163
164
165
# File 'lib/shex.rb', line 162

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



155
156
157
# File 'lib/shex.rb', line 155

def expression
  @expression
end

Instance Method Details

#inspectObject



167
168
169
# File 'lib/shex.rb', line 167

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