Exception: BingAdsRubySdk::Errors::GeneralError
- Inherits:
-
StandardError
- Object
- StandardError
- BingAdsRubySdk::Errors::GeneralError
- Defined in:
- lib/bing_ads_ruby_sdk/errors/errors.rb
Overview
Base exception class for reporting API errors
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#raw_response ⇒ Object
Returns the value of attribute raw_response.
Instance Method Summary collapse
-
#initialize(response) ⇒ GeneralError
constructor
A new instance of GeneralError.
Constructor Details
#initialize(response) ⇒ GeneralError
Returns a new instance of GeneralError.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bing_ads_ruby_sdk/errors/errors.rb', line 9 def initialize(response) @raw_response = response code = response[:error_code] || "Bing Ads API error" = response[:message] || response[:faultstring] || "See exception details for more information." @message = (code, ) end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'lib/bing_ads_ruby_sdk/errors/errors.rb', line 7 def @message end |
#raw_response ⇒ Object
Returns the value of attribute raw_response.
7 8 9 |
# File 'lib/bing_ads_ruby_sdk/errors/errors.rb', line 7 def raw_response @raw_response end |