Exception: SHACL::Error

Inherits:
StandardError
  • Object
show all
Defined in:
vendor/bundler/ruby/3.3.0/bundler/gems/shacl-e638b9acc6d8/lib/shacl.rb

Direct Known Subclasses

StructureError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, **options) ⇒ Error

Initializes a new error instance.

Parameters:

Options Hash (**options):



90
91
92
93
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shacl-e638b9acc6d8/lib/shacl.rb', line 90

def initialize(message, **options)
  @code = options.fetch(:status_code, 422)
  super(message.to_s)
end

Instance Attribute Details

#codeObject (readonly)

The status code associated with this error



82
83
84
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shacl-e638b9acc6d8/lib/shacl.rb', line 82

def code
  @code
end