UNPKG

698 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ExceptionHandler = void 0;
4const runtime_exception_1 = require("./exceptions/runtime.exception");
5const logger_service_1 = require("@nestjs/common/services/logger.service");
6class ExceptionHandler {
7 handle(exception) {
8 if (!(exception instanceof runtime_exception_1.RuntimeException)) {
9 ExceptionHandler.logger.error(exception.message, exception.stack);
10 return;
11 }
12 ExceptionHandler.logger.error(exception.what(), exception.stack);
13 }
14}
15exports.ExceptionHandler = ExceptionHandler;
16ExceptionHandler.logger = new logger_service_1.Logger(ExceptionHandler.name);