Exception: JSparrow::Connection::InvalidStateError
- Inherits:
-
StandardError
- Object
- StandardError
- JSparrow::Connection::InvalidStateError
- Defined in:
- lib/connection/provider.rb
Overview
Error to signal invalid state on open or close operation.
Instance Attribute Summary collapse
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(state, operation) ⇒ InvalidStateError
constructor
A new instance of InvalidStateError.
Constructor Details
#initialize(state, operation) ⇒ InvalidStateError
Returns a new instance of InvalidStateError.
69 70 71 72 73 74 |
# File 'lib/connection/provider.rb', line 69 def initialize(state, operation) super("Could not did #{operation} because connection is #{state}.") @state = state @operation = operation end |
Instance Attribute Details
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
67 68 69 |
# File 'lib/connection/provider.rb', line 67 def operation @operation end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
67 68 69 |
# File 'lib/connection/provider.rb', line 67 def state @state end |