AdError

class AdError : Exception


An error that occurred in the SDK. This exception will generally be passed to a listener rather than thrown.

Machine-readable information about the error is contained in its type and code. Its message will be a human-readable version of the same information, potentially with additional details about the cause.

Summary

Nested types

The types of error that can be encountered.

Specifies when the error was encountered, during either ad loading or playback.

Public constructors

AdError(
    errorType: AdError.AdErrorType!,
    errorCode: AdError.AdErrorCode!,
    detailMessage: String!
)

Constructs an AdError instance with the specified error type, enum error code, and detailed message.

AdError(
    errorType: AdError.AdErrorType!,
    errorCode: Int,
    detailMessage: String!
)

Constructs an AdError instance with the specified error type, numeric error code, and detailed message.

Public functions

Int

Returns the error code's number.

String!

Returns a human-readable summary of the error.

Public constructors

AdError

AdError(
    errorType: AdError.AdErrorType!,
    errorCode: AdError.AdErrorCode!,
    detailMessage: String!
)

Constructs an AdError instance with the specified error type, enum error code, and detailed message.

Parameters
errorType: AdError.AdErrorType!

whether the error occurred during ad loading or playback

errorCode: AdError.AdErrorCode!

the machine-readable enum representation of the error

detailMessage: String!

a human-readable description of the error cause

AdError

AdError(
    errorType: AdError.AdErrorType!,
    errorCode: Int,
    detailMessage: String!
)

Constructs an AdError instance with the specified error type, numeric error code, and detailed message.

Parameters
errorType: AdError.AdErrorType!

whether the error occurred during ad loading or playback

errorCode: Int

the numeric error identifier

detailMessage: String!

a human-readable description of the error cause

Public functions

getErrorCodeNumber

fun getErrorCodeNumber(): Int

Returns the error code's number.

getMessage

fun getMessage(): String!

Returns a human-readable summary of the error.

Public properties

errorCode

val errorCode: AdError.AdErrorCode!

errorType

val errorType: AdError.AdErrorType!