UNPKG

@awayjs/core

Version:
24 lines (23 loc) 980 B
import { __extends } from "tslib"; import { ErrorBase } from './ErrorBase'; var DEFAULT_ERROR = 'An abstract method was called! Either an instance of an abstract export class was created,' + 'or an abstract method was not overridden by the subclass.'; /** * AbstractMethodError is thrown when an abstract method is called. The method in question should be overridden * by a concrete subclass. */ var AbstractMethodError = /** @class */ (function (_super) { __extends(AbstractMethodError, _super); /** * Create a new AbstractMethodError. * @param message An optional message to override the default error message. * @param id The id of the error. */ function AbstractMethodError(message, id) { if (message === void 0) { message = null; } if (id === void 0) { id = 0; } return _super.call(this, message || DEFAULT_ERROR, id) || this; } return AbstractMethodError; }(ErrorBase)); export { AbstractMethodError };