LoadAdError

Kotlin|Java

public final classLoadAdError extendsAdError


Error information about why an ad load operation failed.

Summary

Public constructors

LoadAdError(
    int code,
    @NonNullString message,
    @NonNullString domain,
    @NullableAdError cause,
    @NullableResponseInfo responseInfo
)

Creates aLoadAdError.

Public methods

@NullableResponseInfo

Gets the ResponseInfo of the error.

String

Returns a log friendly string version of this object.

Inherited Constants

Fromcom.google.android.gms.ads.AdError
static finalString
UNDEFINED_DOMAIN = "undefined"

The undefined error domain.

Inherited methods

Fromcom.google.android.gms.ads.AdError
@NullableAdError

Gets the cause of this error ornull if the cause is nonexistent or unknown.

int

Gets the error's code.

@NonNullString

Gets the domain of the error.

@NonNullString

Gets the message describing the error.

Public fields

responseInfo

public final @NullableResponseInfo responseInfo

Public constructors

LoadAdError

public LoadAdError(
    int code,
    @NonNullString message,
    @NonNullString domain,
    @NullableAdError cause,
    @NullableResponseInfo responseInfo
)

Creates aLoadAdError.

Parameters
int code

the error code.

@NonNullString message

a message detailing the error.

@NonNullString domain

the error domain.

@NullableAdError cause

the cause of this error ornull if the cause is nonexistent or unknown.

@NullableResponseInfo responseInfo

ad response information.

Public methods

getResponseInfo

public @NullableResponseInfo getResponseInfo()

Gets the ResponseInfo of the error.

toString

public String toString()

Returns a log friendly string version of this object.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-20 UTC.