1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.ExceptionHandler = void 0;
|
4 | const runtime_exception_1 = require("./exceptions/runtime.exception");
|
5 | const logger_service_1 = require("@nestjs/common/services/logger.service");
|
6 | class 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 | }
|
15 | exports.ExceptionHandler = ExceptionHandler;
|
16 | ExceptionHandler.logger = new logger_service_1.Logger(ExceptionHandler.name);
|