Exception: NextStation::Operation::Halt
- Inherits:
-
StandardError
- Object
- StandardError
- NextStation::Operation::Halt
- Defined in:
- lib/next_station/operation/errors.rb
Overview
Raised internally to stop the operation flow and return a failure.
Instance Attribute Summary collapse
-
#details ⇒ Hash
readonly
Additional error details.
-
#error ⇒ NextStation::Result::Error
readonly
An existing error object.
-
#msg_keys ⇒ Hash
readonly
Keys for message interpolation.
-
#type ⇒ Symbol
readonly
The error type.
Instance Method Summary collapse
-
#initialize(type: nil, msg_keys: {}, details: {}, error: nil) ⇒ Halt
constructor
A new instance of Halt.
Constructor Details
#initialize(type: nil, msg_keys: {}, details: {}, error: nil) ⇒ Halt
Returns a new instance of Halt.
20 21 22 23 24 25 |
# File 'lib/next_station/operation/errors.rb', line 20 def initialize(type: nil, msg_keys: {}, details: {}, error: nil) @type = type @msg_keys = msg_keys @details = details @error = error end |
Instance Attribute Details
#details ⇒ Hash (readonly)
Returns Additional error details.
12 13 14 |
# File 'lib/next_station/operation/errors.rb', line 12 def details @details end |
#error ⇒ NextStation::Result::Error (readonly)
Returns An existing error object.
14 15 16 |
# File 'lib/next_station/operation/errors.rb', line 14 def error @error end |
#msg_keys ⇒ Hash (readonly)
Returns Keys for message interpolation.
10 11 12 |
# File 'lib/next_station/operation/errors.rb', line 10 def msg_keys @msg_keys end |
#type ⇒ Symbol (readonly)
Returns The error type.
8 9 10 |
# File 'lib/next_station/operation/errors.rb', line 8 def type @type end |