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.



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

#operationObject (readonly)

Returns the value of attribute operation.



167
168
169
# File 'lib/connection.rb', line 167

def operation
  @operation
end

#stateObject (readonly)

Returns the value of attribute state.



167
168
169
# File 'lib/connection.rb', line 167

def state
  @state
end