Exception: Pipe2me::HTTP::Error

Inherits:
RuntimeError
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pipe2me/ext/http.rb

Overview

Base class for HTTP related errors.

Direct Known Subclasses

ResourceNotFound, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Error

:nodoc:



29
30
31
# File 'lib/pipe2me/ext/http.rb', line 29

def initialize(response) #:nodoc:
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

The response object (of class HTTP::Response).



27
28
29
# File 'lib/pipe2me/ext/http.rb', line 27

def response
  @response
end

Instance Method Details

#messageObject

:nodoc:



36
37
38
# File 'lib/pipe2me/ext/http.rb', line 36

def message #:nodoc:
  "#{url}: #{code} #{@response[0..120]} (#{@response.response.class})"
end