Exception: JSparrow::Connection::InvalidStateError

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(state, operation) ⇒ InvalidStateError

Returns a new instance of InvalidStateError.



177
178
179
180
181
182
# File 'lib/connection.rb', line 177

def initialize(state, operation)
  super("Could not did #{operation} because connection is #{state}.")

  @state     = state
  @operation = operation
end

Instance Attribute Details

#operationObject (readonly)

Returns the value of attribute operation.



175
176
177
# File 'lib/connection.rb', line 175

def operation
  @operation
end

#stateObject (readonly)

Returns the value of attribute state.



175
176
177
# File 'lib/connection.rb', line 175

def state
  @state
end