Exception: ShEx::Error

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

Direct Known Subclasses

NotMatched, NotSatisfied, ParseError, StructureError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, **options) ⇒ Error

Initializes a new patch error instance.

Parameters:

Options Hash (**options):



122
123
124
125
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shex-f64040a493d0/lib/shex.rb', line 122

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



114
115
116
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/shex-f64040a493d0/lib/shex.rb', line 114

def code
  @code
end