Exception: QcloudVod::RequestError
- Defined in:
- lib/qcloud_vod/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#origin_response ⇒ Object
readonly
Returns the value of attribute origin_response.
Instance Method Summary collapse
-
#initialize(response) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(response) ⇒ RequestError
Returns a new instance of RequestError.
9 10 11 12 13 14 15 16 |
# File 'lib/qcloud_vod/error.rb', line 9 def initialize(response) if response.parsed_response.key?('Code') @code = response.parsed_response['Code'] @message = response.parsed_response['Message'] end @origin_response = response super("API ERROR Code=#{@code}, Message=#{@message}") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/qcloud_vod/error.rb', line 5 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/qcloud_vod/error.rb', line 6 def @message end |
#origin_response ⇒ Object (readonly)
Returns the value of attribute origin_response.
7 8 9 |
# File 'lib/qcloud_vod/error.rb', line 7 def origin_response @origin_response end |