UNPKG

@gabliam/web-core

Version:
20 lines (19 loc) 666 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BadInterceptorError = void 0; /** * Exception when interceptor not implement Interceptor */ class BadInterceptorError extends Error { constructor(interceptor) { super(); this.name = 'BadInterceptorError'; // Set the prototype explicitly. Object.setPrototypeOf(this, BadInterceptorError.prototype); const name = interceptor.constructor ? interceptor.constructor.name : interceptor; this.message = `${name} must implement Interceptor interface`; } } exports.BadInterceptorError = BadInterceptorError;