AdError

public classAdErrorextendsObject
Known Direct Subclasses

Error information about why an ad operation failed.

Constant Summary

String UNDEFINED_DOMAIN The undefined error domain.

Public Constructor Summary

AdError(int code,Stringmessage, String domain)
Creates anAdError.
AdError(int code,Stringmessage, String domain,AdErrorcause)
Creates anAdError with an underlyingcause.

Public Method Summary

AdError
getCause()
Gets the cause of this error ornullif the cause is nonexistent or unknown.
int
getCode()
Gets the error's code.
String
getDomain()
Gets the domain of the error.
String
getMessage()
Gets the message describing the error.
String
toString()
Returns a log friendly string version of this object.

Inherited Method Summary

Constants

public static finalString UNDEFINED_DOMAIN

The undefined error domain.

The Google Mobile Ads SDK returns this domain forgetDomain() when converting error information from legacy mediation adapter callbacks like MediationAdLoadCallback.onFailure(String)to anAdError.

Constant Value:"undefined"

Public Constructors

publicAdError(int code,Stringmessage,Stringdomain)

Creates anAdError.

Parameters
code the error code.
message a message detailing the error.
domain the error domain.

publicAdError(int code,Stringmessage,Stringdomain,AdErrorcause)

Creates anAdErrorwith an underlyingcause.

Parameters
code the error code.
message a message detailing the error.
domain the error domain.
cause the cause of this error.

Public Methods

publicAdError getCause()

Gets the cause of this error ornullif the cause is nonexistent or unknown.

public intgetCode()

Gets the error's code.

publicStringgetDomain()

Gets the domain of the error.

Returns
  • MobileAds.ERROR_DOMAIN for Google Mobile Ads SDK errors, or a domain defined by mediation networks for mediation errors.

publicStringgetMessage()

Gets the message describing the error.

publicStringtoString()

Returns a log friendly string version of this object.