AdInspectorError

public final class AdInspectorError extends AdError


有关广告检查器失败原因的错误信息。

摘要

嵌套类型

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

AdInspectorError 支持的常量。

常量

static final int

广告检查器已打开,因此无法再次打开。

static final int

广告检查器未能加载。

static final int

广告检查器出现内部错误。

static final int

由于设备未处于测试模式,因此无法打开广告检查器。

公共构造函数

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

创建 AdInspectorError

公共方法

int

获取错误的代码。

继承的常量

static final String
UNDEFINED_DOMAIN = "undefined"

未定义的错误网域。

继承的方法

@Nullable AdError

获取此错误的原因,如果原因不存在或未知,则返回 null

@NonNull String

获取错误的网域。

@NonNull String

获取用于描述错误的消息。

String

返回此对象的适合日志记录的字符串版本。

常量

ERROR_CODE_ALREADY_OPEN

public static final int ERROR_CODE_ALREADY_OPEN = 3

广告检查器已打开,因此无法再次打开。

ERROR_CODE_FAILED_TO_LOAD

public static final int ERROR_CODE_FAILED_TO_LOAD = 1

广告检查器未能加载。

ERROR_CODE_INTERNAL_ERROR

public static final int ERROR_CODE_INTERNAL_ERROR = 0

广告检查器出现内部错误。

ERROR_CODE_NOT_IN_TEST_MODE

public static final int ERROR_CODE_NOT_IN_TEST_MODE = 2

由于设备未处于测试模式,因此无法打开广告检查器。如需了解详情,请参阅 https://developers.google.com/admob/android/test-ads#enable_test_devices。

公共构造函数

AdInspectorError

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

创建 AdInspectorError

参数
@AdInspectorError.AdInspectorErrorCode int code

错误代码。

@NonNull String message

详细说明错误的消息。

@NonNull String domain

错误网域。

公共方法

getCode

@AdInspectorError.AdInspectorErrorCode
public int getCode()

获取错误的代码。