UNPKG

@webxsid/nest-exception

Version:

A centralized exception handling module for NestJS applications. It provides structured error management, logging, and automatic exception handling.

10 lines 547 B
import { ArgumentsHost } from '@nestjs/common'; type ExceptionHandler<T extends Error> = (exception: T, host: ArgumentsHost) => void; type ExceptionConstructor<T extends Error = Error> = abstract new (...args: any[]) => T; export declare class ExceptionHandlerService { private handlers; register<T extends Error>(exceptionType: ExceptionConstructor<T>, handler: ExceptionHandler<T>): void; getHandler<T extends Error>(exception: T): ExceptionHandler<T> | undefined; } export {}; //# sourceMappingURL=exception-handler.service.d.ts.map