AI-generated Key Takeaways
-
AdError
provides details about failures during ad loading or playing, distinguishing between these two error types. -
The
AdError
class includes properties likecause
,message
,name
, andstack
to describe the error. -
Methods available in
AdError
includegetErrorCode
,getInnerError
,getMessage
,getType
, andgetVastErrorCode
, offering different ways to retrieve information about the error. -
The
getInnerError
method returns the error that caused the current error, which can be either a native error or anAdError
instance, or it can be null if no inner error is present. -
The
getVastErrorCode
method can be used to retrieve the VAST error code if available or the defaultAdError.ErrorCode.UNKNOWN_ERROR
if not available.
Error
Properties | |
---|---|
message
|
|
name
|
|
stack
|
Methods | |
---|---|
get
|
Returns the error code. |
get
|
Returns the Error that caused this one. |
get
|
Returns the message for this error. |
get
|
Returns the type of this error. |
get
|
Returns the VAST error code. |
Properties
message
message: string
name
name: string
Optional
stack
stack?: string
Methods
getErrorCode
getErrorCode(): number
Returns | |
---|---|
number
|
The error code, as defined in AdError.ErrorCode. |
getInnerError
getInnerError(): Error
Returns | |
---|---|
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 | |
---|---|
string
|
The message for this error. |
getType
getType(): string
Returns | |
---|---|
string
|
The type of this error, as defined in AdError.Type. |
getVastErrorCode
getVastErrorCode(): number
Returns | |
---|---|
number
|
If VAST error code is available, returns it, otherwise returns AdError.ErrorCode.UNKNOWN_ERROR. |