Module

base/error

XDK custom error module. Two sets of APIs are exposed, we recommend you pick a set for your project to avoid possible confusion.

If you are using requireJs, or importing the entire the error module in ES6, you may wish to use the set of error API without the "Error" suffix.

If you are using ES6 import, and then destructure the object to get a single function, you may want to use set of error API with the Error suffix.

Example

// requireJs
define('foo', ['base/error'], function (error) {
  throw error.illegalState("foo");
});

// ES6, import error module and use it directly.
import { error } from 'xdk3';
throw error.illegalState("foo");

// ES6, import and deconstruct.
import {error} from 'xdk3';
const {illegalArgumentError, unsupportedOperationError} = error;
throw new illegalArgumentError("throw error using ES6 Import");

Classes

Generic
GenericError
IllegalArgument
IllegalArgumentError
IllegalState
IllegalStateError
Internal
InternalError
Unauthorized
UnauthorizedError
UnsupportedOperation
UnsupportedOperationError
XDKError