Exception: HttpStreamingClient::HttpError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/http_streaming_client/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, message, headers = nil, response = nil) ⇒ HttpError

Returns a new instance of HttpError.



46
47
48
49
50
51
52
# File 'lib/http_streaming_client/errors.rb', line 46

def initialize(status, message, headers = nil, response = nil)
  super "#{status}:#{message}:#{headers}:#{response}"
  @status = status
  @message = message
  @headers = headers
  @response = response
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



44
45
46
# File 'lib/http_streaming_client/errors.rb', line 44

def headers
  @headers
end

#messageObject (readonly)

Returns the value of attribute message.



44
45
46
# File 'lib/http_streaming_client/errors.rb', line 44

def message
  @message
end

#responseObject (readonly)

Returns the value of attribute response.



44
45
46
# File 'lib/http_streaming_client/errors.rb', line 44

def response
  @response
end

#statusObject (readonly)

Returns the value of attribute status.



44
45
46
# File 'lib/http_streaming_client/errors.rb', line 44

def status
  @status
end