@nestjs/core
Version:
Nest - modern, fast, powerful node.js web framework (@core)
12 lines (11 loc) • 386 B
JavaScript
import { IntrinsicException, Logger } from '@nestjs/common';
export class ExternalExceptionFilter {
static logger = new Logger('ExceptionsHandler');
catch(exception, host) {
if (exception instanceof Error &&
!(exception instanceof IntrinsicException)) {
ExternalExceptionFilter.logger.error(exception);
}
throw exception;
}
}