UNPKG

libmodulor

Version:

A TypeScript library to create platform-agnostic applications

8 lines (7 loc) 324 B
export class NotCallableError extends Error { constructor(calledFn, callableFn, reason) { super(`Do not call ${calledFn.toString()}(). Call ${callableFn.toString()}() instead (reason : ${reason})`); this.name = 'NotCallableError'; Object.setPrototypeOf(this, NotCallableError.prototype); } }