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.



211
212
213
214
215
# File 'lib/t2-server/exceptions.rb', line 211

def initialize(connection)
  @redirect = connection

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

Instance Attribute Details

#redirectObject (readonly)

The redirected connection



207
208
209
# File 'lib/t2-server/exceptions.rb', line 207

def redirect
  @redirect
end