top

CAPH.WUI.WIDGET.WIDGETERROR

WidgetError represents all types of errors for Widget, including INVALID_VALUE, UNKNOWN_ERROR, TIMEOUT_ERROR, VALIDATION_ERROR, NOT_FOUND_ERROR, TYPE_MISMATCH_ERROR.


Methods

throwError

Description
Throws the error, when it finds the corresponding error during the operation, and giving the message of the type of error.
Parameters
■code
  - Number
  - The error code of the type of error.
■msg (Optional)
  - String
  - It's an optional parameter, giving the message of the type error to user.
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var WidgetError = window.caph.wui.widget.WidgetError;

WidgetError.throwError(WidgetError.INVALID_VALUE, 'object is not defined in animation');