Exception: JSparrow::Connection::InvalidStateError
- Inherits:
-
StandardError
- Object
- StandardError
- JSparrow::Connection::InvalidStateError
- Defined in:
- lib/connection.rb
Overview
Erro para quando uma conexao esta num estado invalido para uma operacao (open ou close).
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.
169 170 171 172 173 174 |
# File 'lib/connection.rb', line 169 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.
167 168 169 |
# File 'lib/connection.rb', line 167 def operation @operation end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
167 168 169 |
# File 'lib/connection.rb', line 167 def state @state end |