UNPKG

@aurigma/design-atoms-model

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

63 lines 2.16 kB
export class Exception extends Error { constructor(message) { super(message); this.name = "CustomersCanvasException"; Object["setPrototypeOf"](this, Exception.prototype); //https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work } toString() { return `${this.name}: ${this.message}`; } toJSON() { return { name: this.name, innerException: this.innerException, message: this.message }; } } export class NotImplementedException extends Exception { constructor(message) { super(message); this.name = "NotImplementedException"; Object["setPrototypeOf"](this, NotImplementedException.prototype); } } export class ArgumentException extends Exception { constructor(message) { super(message); this.name = "ArgumentException"; Object["setPrototypeOf"](this, ArgumentException.prototype); } } export class ArgumentNullException extends ArgumentException { constructor(message) { super(message); this.name = "ArgumentNullException"; Object["setPrototypeOf"](this, ArgumentNullException.prototype); } } export class OutOfRangeException extends Exception { constructor(message) { super(message); this.name = "OutOfRangeException"; Object["setPrototypeOf"](this, OutOfRangeException.prototype); } } export class InvalidOperationException extends Exception { constructor(message) { super(message); this.name = "InvalidOperationException"; Object["setPrototypeOf"](this, InvalidOperationException.prototype); } } /** * This exception is thrown when unexpected data is encountered. */ export class UnexpectedDataException extends Exception { constructor(message) { super(message); this.name = "UnexpectedDataException"; Object["setPrototypeOf"](this, UnexpectedDataException.prototype); } } //# sourceMappingURL=Exception.js.map