Exception: Fluffle::Errors::CustomError
- Defined in:
- lib/fluffle/errors.rb
Overview
Raise this within your own code to get an error that will be faithfully translated into the code, message, and data member fields of the spec’s ‘Error` response object
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(code: 0, message:, data: nil) ⇒ CustomError
constructor
A new instance of CustomError.
Methods inherited from BaseError
Constructor Details
#initialize(code: 0, message:, data: nil) ⇒ CustomError
Returns a new instance of CustomError.
30 31 32 33 34 35 |
# File 'lib/fluffle/errors.rb', line 30 def initialize(code: 0, message:, data: nil) @code = code @data = data super end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
28 29 30 |
# File 'lib/fluffle/errors.rb', line 28 def code @code end |
#data ⇒ Object
Returns the value of attribute data.
28 29 30 |
# File 'lib/fluffle/errors.rb', line 28 def data @data end |