Stay organized with collections
Save and categorize content based on your preferences.
firebase::
gma::
AdError
#include <types.h>
Information about why an ad operation failed.
Summary
Constructors and Destructors
const char *const
A domain string which represents an undefined error domain.
Retrieves an AdError
which represents the cause of this error.
virtual const std::string &
Returns a log friendly string version of this object.
const std::string &
Gets the domain of the error.
const std::string &
Gets the message describing the error.
Gets the ResponseInfo
if an error occurred during a loadAd operation.
Public static attributes
kUndefinedDomain
const
char
*
const
kUndefinedDomain
A domain string which represents an undefined error domain.
The GMA SDK returns this domain for domain()
method invocations when converting error information from legacy mediation adapter callbacks.
Public functions
AdError
AdError
(
const
AdError
&
ad_error
)
GetCause
std
::
unique_ptr
<
AdError
>
GetCause
()
const
Retrieves an AdError
which represents the cause of this error.
ToString
virtual
const
std
::
string
&
ToString
()
const
Returns a log friendly string version of this object.
domain
const
std
::
string
&
domain
()
const
Gets the domain of the error.
message
const
std
::
string
&
message
()
const
Gets the message describing the error.
response_info
const
ResponseInfo
&
response_info
()
const
Gets the ResponseInfo
if an error occurred during a loadAd operation.
The ResponseInfo
will have empty fields if this AdError
does not represent an error stemming from a load ad operation.
~AdError
virtual
~
AdError
()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],["The `AdError` class provides information about ad operation failures. Key actions include retrieving the error's `code`, `domain`, and `message`, and obtaining the cause of the error via `GetCause`. The `ToString` method returns a string representation of the error. There is also `response_info` to get details if it is related to a loading error. The class includes constructors, a destructor, and an assignment operator for managing `AdError` objects. It has `kUndefinedDomain` for an undefined error domain.\n"]]