Exception: Qiniu::ResponseError
- Defined in:
- lib/qiniu/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
Constructor Details
#initialize(message, response = nil) ⇒ ResponseError
Returns a new instance of ResponseError.
11 12 13 14 |
# File 'lib/qiniu/exceptions.rb', line 11 def initialize(, response = nil) @response = response super() end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/qiniu/exceptions.rb', line 9 def response @response end |
Instance Method Details
#http_body ⇒ Object
20 21 22 |
# File 'lib/qiniu/exceptions.rb', line 20 def http_body @response.body if @response end |
#http_code ⇒ Object
16 17 18 |
# File 'lib/qiniu/exceptions.rb', line 16 def http_code @response.code.to_i if @response end |
#inspect ⇒ Object
24 25 26 |
# File 'lib/qiniu/exceptions.rb', line 24 def inspect "#{}: #{http_body}" end |