LibZL Errors
Error handling
Various methods of LibZL are have callback parameter that will be called with first error argument defined if something went wrong during the execution.
zlbolt.triggerAnimation('DoorFL', false, (error: ZLError, result) => {
if (error)
{
/* handle error */
} else {
/* handle result */
}
})
Most of ZLBolt/Direct2D errors could be handled with error
event.
zlbolt.addEventListener('error' (error: ZLError) => {
/* handle error */
})
Objects
ZLError : object
Base error type that emitted by LibZL.
Kind: global namespace
Group: Errors
Properties
Name | Type | Description |
---|---|---|
code | string | Error code |
message | string | Error message |
details | any | Error details |
ZLBoltErrorCodes : object
Error codes that could be thrown by ZLBolt. Additionally can throw errors of ZLBoltController.
Kind: global namespace
Group: Errors
Param | Description |
---|---|
FAILED_TO_LOAD_METADATA | Thrown when the metadata is failed to load. |
INVALID_STEER_ANGLE | Thrown by |
CONNECTION_ERROR | Thrown when connection error occurs. |
ZLBoltControllerErrorCodes : object
Error codes that could be thrown by controller
Kind: global namespace
Group: Errors
Param | Description |
---|---|
FAILED_TO_DISCONNECT | Thrown when user is trying to call disconnect on disconnected stream. |
NOT_CONNECTED_TO_STREAM | Thrown when user is trying to perform an operation on not connected stream. |
DOM_ELEMENT_NOT_FOUND | Thrown when some required DOM element is not exist in the tree. |
NOT_SUPPORTED | Thrown when user trying to perform operation on controller that doesn't support it. E.g. calling |
CLOUDMINE_ERROR | Thrown when Cloudmine instance is not ready yet. |
NO_SUPPORTED_OUTPUT_METHOD | Thrown when no supported output method found. |
STREAM_CONNECT_FAILED | Thrown when connection to the stream is failed. |
HANDLER_CLASS_NOT_FOUND | Thrown in |
CAMERA_CHANGED | Thrown in 2DOD mode when in |
NOT_IN_360_CAMERA | Thrown in |
FAILED_TO_SET_ROTATION_INDEX | Thrown in |
NO_CAMERA_SAMPLES | Thrown in |
INSTANCE_REQUEST_FAILED | Thrown when request to 3DOD instance is failed. |
SEQUENCE_STATE_ERROR | Thrown in 3DOD mode when the state of sequence in wrong state. |
NO_DIRECT2D_INSTANCE | Thrown by |