Ads API .NET library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Google.Api.Ads.AdWords.Util.BatchJob.BulkJobErrorHandler Class Reference

Error handler for bulk job requests. More...

Inheritance diagram for Google.Api.Ads.AdWords.Util.BatchJob.BulkJobErrorHandler:
Google.Api.Ads.Common.Lib.ErrorHandler

Public Member Functions

 BulkJobErrorHandler (AdsUser user)
 Initializes a new instance of the BulkJobErrorHandler class. More...
 
override bool ShouldRetry (Exception ex)
 Checks if an API call should be retried when an exception occurs. More...
 
override bool IsTransientError (Exception exception)
 Determines whether the exception thrown by the server is a transient error. More...
 
override void PrepareForRetry (Exception exception)
 Prepares the system for retrying the last failed call. More...
 
- Public Member Functions inherited from Google.Api.Ads.Common.Lib.ErrorHandler
 ErrorHandler (AppConfig config)
 Initializes a new instance of the ErrorHandler class. More...
 
virtual void DoExponentialBackoff ()
 Does the exponential backoff. More...
 
virtual bool HaveMoreRetryAttemptsLeft ()
 Checks if there are more retry attempts left. More...
 
virtual void IncrementRetriedAttempts ()
 Increment the counter for attempts retried. More...
 

Additional Inherited Members

- Protected Attributes inherited from Google.Api.Ads.Common.Lib.ErrorHandler
const int WAIT_TIME = 30000
 Wait time in ms to wait before retrying a call. The actual retry time will be higher due to exponential backoff. More...
 
readonly AppConfig config
 The application configuration. More...
 

Detailed Description

Error handler for bulk job requests.

Constructor & Destructor Documentation

Google.Api.Ads.AdWords.Util.BatchJob.BulkJobErrorHandler.BulkJobErrorHandler ( AdsUser  user)
inline

Initializes a new instance of the BulkJobErrorHandler class.

Parameters
userThe AdWords user.

Member Function Documentation

override bool Google.Api.Ads.AdWords.Util.BatchJob.BulkJobErrorHandler.IsTransientError ( Exception  exception)
inlinevirtual

Determines whether the exception thrown by the server is a transient error.

Parameters
exceptionThe exception.
Returns
True, if the server exception is a transient error, false otherwise.

Reimplemented from Google.Api.Ads.Common.Lib.ErrorHandler.

References Google.Api.Ads.AdWords.Util.BatchJob.CloudStorageError.code, and Google.Api.Ads.AdWords.Util.BatchJob.AdWordsBulkRequestException.error.

override void Google.Api.Ads.AdWords.Util.BatchJob.BulkJobErrorHandler.PrepareForRetry ( Exception  exception)
inlinevirtual

Prepares the system for retrying the last failed call.

Parameters
exceptionThe exception.

Reimplemented from Google.Api.Ads.Common.Lib.ErrorHandler.

override bool Google.Api.Ads.AdWords.Util.BatchJob.BulkJobErrorHandler.ShouldRetry ( Exception  ex)
inlinevirtual

Checks if an API call should be retried when an exception occurs.

Parameters
exThe exception.
Returns
True, if the call should be retried, false otherwise.

Reimplemented from Google.Api.Ads.Common.Lib.ErrorHandler.


The documentation for this class was generated from the following file: