Exception: Qiniu::S3::ResponseError
- Defined in:
- lib/qiniu/s3/exceptions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #http_body ⇒ Object
- #http_code ⇒ Object
-
#initialize(message, response = nil) ⇒ ResponseError
constructor
A new instance of ResponseError.
- #inspect ⇒ Object
Methods inherited from Exception
Constructor Details
#initialize(message, response = nil) ⇒ ResponseError
Returns a new instance of ResponseError.
15 16 17 18 |
# File 'lib/qiniu/s3/exceptions.rb', line 15 def initialize(, response = nil) @response = response super() end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
13 14 15 |
# File 'lib/qiniu/s3/exceptions.rb', line 13 def response @response end |
Instance Method Details
#http_body ⇒ Object
24 25 26 |
# File 'lib/qiniu/s3/exceptions.rb', line 24 def http_body @response.body if @response end |
#http_code ⇒ Object
20 21 22 |
# File 'lib/qiniu/s3/exceptions.rb', line 20 def http_code @response.code.to_i if @response end |
#inspect ⇒ Object
28 29 30 |
# File 'lib/qiniu/s3/exceptions.rb', line 28 def inspect "#{message}: #{http_body}" end |