AdInspectorError

public final class AdInspectorError extends AdError


Error information about why the ad inspector failed.

Summary

Nested types

@Retention(value = SOURCE)
@IntDef(value = )
public annotation AdInspectorError.AdInspectorErrorCode

Constants supported by AdInspectorError.

Constants

static final int

Ad inspector cannot be opened because it is already open.

static final int

Ad inspector failed to load.

static final int

Ad inspector had an internal error.

static final int

Ad inspector cannot be opened because the device is not in test mode.

Public constructors

AdInspectorError(
    @AdInspectorError.AdInspectorErrorCode int code,
    @NonNull String message,
    @NonNull String domain
)

Creates an AdInspectorError.

Public methods

int

Gets the error's code.

Inherited Constants

static final String
UNDEFINED_DOMAIN = "undefined"

The undefined error domain.

Inherited methods

@Nullable AdError

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

@NonNull String

Gets the domain of the error.

@NonNull String

Gets the message describing the error.

String

Returns a log friendly string version of this object.

Constants

ERROR_CODE_ALREADY_OPEN

public static final int ERROR_CODE_ALREADY_OPEN = 3

Ad inspector cannot be opened because it is already open.

ERROR_CODE_FAILED_TO_LOAD

public static final int ERROR_CODE_FAILED_TO_LOAD = 1

Ad inspector failed to load.

ERROR_CODE_INTERNAL_ERROR

public static final int ERROR_CODE_INTERNAL_ERROR = 0

Ad inspector had an internal error.

ERROR_CODE_NOT_IN_TEST_MODE

public static final int ERROR_CODE_NOT_IN_TEST_MODE = 2

Ad inspector cannot be opened because the device is not in test mode. See https://developers.google.com/admob/android/test-ads#enable_test_devices for more information.

Public constructors

AdInspectorError

public AdInspectorError(
    @AdInspectorError.AdInspectorErrorCode int code,
    @NonNull String message,
    @NonNull String domain
)

Creates an AdInspectorError.

Parameters
@AdInspectorError.AdInspectorErrorCode int code

the error code.

@NonNull String message

a message detailing the error.

@NonNull String domain

the error domain.

Public methods

getCode

@AdInspectorError.AdInspectorErrorCode
public int getCode()

Gets the error's code.