Interface AdError


Extends Error
AdError surfaces information to the user about whether a failure occurred during ad loading or playing. The errorType accessor provides information about whether the error occurred during ad loading or ad playing.
Properties
cause?
message
name
stack?
Methods
getErrorCode
Returns the error code.
getInnerError
Returns the Error that caused this one.
getMessage
Returns the message for this error.
getType
Returns the type of this error.
getVastErrorCode
Returns the VAST error code.

Properties


Optional cause

cause?: unknown

message

message: string

name

name: string

Optional stack

stack?: string

Methods


getErrorCode

getErrorCode(): number
Returns the error code.
Returns
number The error code, as defined in AdError.ErrorCode.

getInnerError

getInnerError(): null | Error
Returns the Error that caused this one.
Returns
null | Error Inner error that occurred during processing, or null if this information is unavailable. This error may either be a native error or an AdError, a subclass of a native error. This may return null if the error that caused this one is not available.

getMessage

getMessage(): string
Returns the message for this error.
Returns
string The message for this error.

getType

getType(): string
Returns the type of this error.
Returns
string The type of this error, as defined in AdError.Type.

getVastErrorCode

getVastErrorCode(): number
Returns the VAST error code.
Returns
number If VAST error code is available, returns it, otherwise returns AdError.ErrorCode.UNKNOWN_ERROR.