Class: RazorRisk::Cassini::Mixin::RazorResponseValidator::RazorErrorException

Inherits:
RazorRisk::Core::Diagnostics::Exceptions::RRCSBaseException
  • Object
show all
Includes:
Pantheios, RazorRisk::Core::Diagnostics::Logger, Xqsr3::Quality::ParameterChecking
Defined in:
lib/razor_risk/cassini/mixin/razor_response_validator.rb

Overview

########################################################## exceptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_status, message, **options) ⇒ RazorErrorException

Raised when a qualified response failed with a Razor Error specified.

Parameters:

  • http_status (Integer) —

    The recommended HTTP error status.

  • message (String) —

    The exception message.

  • options (Hash) —

    The options hash.

Options Hash (**options):

  • :cause (Exception) —

    The causing exception.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/razor_risk/cassini/mixin/razor_response_validator.rb', line 71

def initialize http_status, message, **options

    trace(
        ParamNames[ :http_status, :message, :options ],
        http_status, message, options
    )

    @http_status = check_parameter(
        http_status, 'http_status',
        type: Integer,
    )

    super message, **options

    @options = options
end

Instance Attribute Details

#http_status ⇒ Object (readonly)

Returns the value of attribute http_status.



60
61
62
# File 'lib/razor_risk/cassini/mixin/razor_response_validator.rb', line 60

def http_status
  @http_status
end

#options ⇒ Object (readonly)

Returns the value of attribute options.



61
62
63
# File 'lib/razor_risk/cassini/mixin/razor_response_validator.rb', line 61

def options
  @options
end