Exception: Exceptions::ConnectionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/capitan/exceptions/connection_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ ConnectionError

Returns a new instance of ConnectionError.



4
5
6
7
8
9
# File 'lib/capitan/exceptions/connection_error.rb', line 4

def initialize(error)
  message = error.message
  message = socket_error_message if error.class == SocketError
  message = unauthorized_message if error.class == RestClient::Unauthorized
  super(message)
end