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