Exception: RightScale::HttpException
- Defined in:
- lib/right_agent/http_exceptions.rb
Overview
Base HTTP exception class
Direct Known Subclasses
Instance Attribute Summary collapse
-
#http_body ⇒ Object
readonly
Returns the value of attribute http_body.
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
- #message ⇒ Object
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(code, body, response = nil) ⇒ HttpException
constructor
A new instance of HttpException.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(code, body, response = nil) ⇒ HttpException
Returns a new instance of HttpException.
22 23 24 25 26 |
# File 'lib/right_agent/http_exceptions.rb', line 22 def initialize(code, body, response = nil) @http_code = code @http_body = body @response = response end |
Instance Attribute Details
#http_body ⇒ Object (readonly)
Returns the value of attribute http_body.
19 20 21 |
# File 'lib/right_agent/http_exceptions.rb', line 19 def http_body @http_body end |
#http_code ⇒ Object (readonly)
Returns the value of attribute http_code.
19 20 21 |
# File 'lib/right_agent/http_exceptions.rb', line 19 def http_code @http_code end |
#message ⇒ Object
36 37 38 |
# File 'lib/right_agent/http_exceptions.rb', line 36 def @message || self.class.name end |
#response ⇒ Object
Returns the value of attribute response.
20 21 22 |
# File 'lib/right_agent/http_exceptions.rb', line 20 def response @response end |