Exception: T2Server::ConnectionRedirectError

Inherits:
T2ServerError
  • Object
show all
Defined in:
lib/t2-server/exceptions.rb

Overview

Raised if the server wishes to redirect the connection. This typically happens if a client tries to connect to a https server vis a http uri.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ ConnectionRedirectError

Create a new ConnectionRedirectError with the new, redirected, connection supplied.



199
200
201
202
203
# File 'lib/t2-server/exceptions.rb', line 199

def initialize(connection)
  @redirect = connection

  super "The server returned an unhandled redirect to '#{@redirect}'."
end

Instance Attribute Details

#redirectObject (readonly)

The redirected connection



195
196
197
# File 'lib/t2-server/exceptions.rb', line 195

def redirect
  @redirect
end