global-error-handler
Version:
This package is for handling error in any type of Javascript application in an aspect oriented way.
15 lines (12 loc) • 364 B
TypeScript
export interface HandlerOptions {
override: boolean;
}
export interface ErrorHandler {
key: string;
handler: Function;
}
export class GlobalErrorHandler {
register(errorHandler: ErrorHandler, options: HandlerOptions): boolean;
isRegistered(errorHandlerKey: string): boolean;
handle(error: Error | any, errorHandlerKey: string): void;
}