AI-generated Key Takeaways
-
AdError provides information about failures during ad loading or playing, with the errorType indicating the stage of failure.
-
The AdError class includes properties like message, name, and stack, along with methods to retrieve the error code, inner error, message, type, and VAST error code.
-
Methods like
getErrorCode
return numerical codes, whilegetMessage
andgetType
return string values about the error. -
The
getInnerError
method provides access to the underlying error that triggered the AdError instance. -
getVastErrorCode
specifically returns the VAST error code if available, otherwise a general unknown error code.
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. |