Exception: BingAdsApi::ApiException
- Inherits:
-
Exception
- Object
- Exception
- BingAdsApi::ApiException
- Defined in:
- lib/bing-ads-api/api_exception.rb
Overview
Public : Generic exception thrown by service classes in BingAdsApi.
Exception of this kind wrap an AdApiFaultDetail or ApiFaultDetail instance
to look over the specific details of the SOAP request fault.
- Author
Example
Instance Attribute Summary collapse
-
#fault_object ⇒ Object
Returns the value of attribute fault_object.
Instance Method Summary collapse
-
#initialize(fault_object, msg = nil) ⇒ ApiException
constructor
Public : Constructor.
-
#to_s ⇒ Object
Public : Specified to string method .
Constructor Details
#initialize(fault_object, msg = nil) ⇒ ApiException
Public : Constructor. Based on the default Exception constructor, adds the fault_object instance, that can be an ApiFaultDetail or AdApiFaultDetail instance
Parameters
-
fault_object - AdApiFaultDetail or ApiFaultDetail instance
-
msg - optional message
- Author
29 30 31 32 |
# File 'lib/bing-ads-api/api_exception.rb', line 29 def initialize(fault_object, msg=nil) super(msg) self.fault_object = fault_object end |
Instance Attribute Details
#fault_object ⇒ Object
Returns the value of attribute fault_object.
18 19 20 |
# File 'lib/bing-ads-api/api_exception.rb', line 18 def fault_object @fault_object end |
Instance Method Details
#to_s ⇒ Object
Public : Specified to string method
- Author
38 39 40 |
# File 'lib/bing-ads-api/api_exception.rb', line 38 def to_s super.to_s + " - " + fault_object.to_s end |