Exception: JSparrow::Connection::InvalidStateError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/connection/provider.rb

Overview

Error to signal invalid state on open or close operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#operationObject (readonly)

Returns the value of attribute operation.



67
68
69
# File 'lib/connection/provider.rb', line 67

def operation
  @operation
end

#stateObject (readonly)

Returns the value of attribute state.



67
68
69
# File 'lib/connection/provider.rb', line 67

def state
  @state
end