Skip to main content

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

NameTypeDescription
codestring

Error code

messagestring

Error message

detailsany

Error details

ZLBoltErrorCodes : object​

Error codes that could be thrown by ZLBolt. Additionally can throw errors of ZLBoltController.

Kind: global namespace
Group: Errors

ParamDescription
FAILED_TO_LOAD_METADATA

Thrown when the metadata is failed to load.

INVALID_STEER_ANGLE

Thrown by setSteerAngle method if the value of steering angle is invalid.

CONNECTION_ERROR

Thrown when connection error occurs.

ZLBoltControllerErrorCodes : object​

Error codes that could be thrown by controller

Kind: global namespace
Group: Errors

ParamDescription
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 startSequence in 2DOD mode.

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 changeStreamOutput method when no handler class found.

CAMERA_CHANGED

Thrown in 2DOD mode when in switchCamera method if during camera switching camera was changed by subsequent switchCamera call.

NOT_IN_360_CAMERA

Thrown in getRotationIndex method if current camera have no 360 samples.

FAILED_TO_SET_ROTATION_INDEX

Thrown in setRotationIndex method if current camera have no 360 samples.

NO_CAMERA_SAMPLES

Thrown in getMaxRotationIndex method if current camera have no 360 samples.

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 getFrameDetails & getFrameStatuses methods if they called before connection.