Handles errors for an Ads API.
More...
|
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...
|
|
Handles errors for an Ads API.
Google.Api.Ads.Common.Lib.ErrorHandler.ErrorHandler |
( |
AppConfig |
config | ) |
|
|
inline |
Initializes a new instance of the ErrorHandler class.
- Parameters
-
config | The application configuration instance. |
virtual void Google.Api.Ads.Common.Lib.ErrorHandler.DoExponentialBackoff |
( |
| ) |
|
|
inlinevirtual |
Does the exponential backoff.
virtual bool Google.Api.Ads.Common.Lib.ErrorHandler.HaveMoreRetryAttemptsLeft |
( |
| ) |
|
|
inlinevirtual |
Checks if there are more retry attempts left.
- Returns
- True, if there are more retry attempts left, false otherwise.
virtual void Google.Api.Ads.Common.Lib.ErrorHandler.IncrementRetriedAttempts |
( |
| ) |
|
|
inlinevirtual |
Increment the counter for attempts retried.
virtual bool Google.Api.Ads.Common.Lib.ErrorHandler.IsTransientError |
( |
Exception |
exception | ) |
|
|
inlinevirtual |
Determines whether the exception thrown by the server is a transient error.
- Parameters
-
- Returns
- True, if the server exception is a transient error, false otherwise.
virtual void Google.Api.Ads.Common.Lib.ErrorHandler.PrepareForRetry |
( |
Exception |
exception | ) |
|
|
inlinevirtual |
Prepares the system for retrying the last failed call.
- Parameters
-
virtual bool Google.Api.Ads.Common.Lib.ErrorHandler.ShouldRetry |
( |
Exception |
exception | ) |
|
|
inlinevirtual |
Checks if an API call should be retried when an exception occurs.
- Parameters
-
- Returns
- True, if the call should be retried, false otherwise.
readonly AppConfig Google.Api.Ads.Common.Lib.ErrorHandler.config |
|
protected |
The application configuration.
const int Google.Api.Ads.Common.Lib.ErrorHandler.WAIT_TIME = 30000 |
|
protected |
Wait time in ms to wait before retrying a call. The actual retry time will be higher due to exponential backoff.
The documentation for this class was generated from the following file: