From 9a7421c4afdc14362a51edc93db78246340fceb6 Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 21 Dec 2022 11:47:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0uncaughtException=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E7=9B=91=E5=90=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 8242369..c339d14 100644 --- a/index.js +++ b/index.js @@ -23,12 +23,14 @@ import Cors from './middleware/cors.js' function hideProperty(host, name, value) { Object.defineProperty(host, name, { value: value, - writable: true, - enumerable: false, - configurable: true + enumerable: false }) } +process.on('uncaughtException', err => { + console.error('UncaughtException: ', err) +}) + export default class Five { constructor() { hideProperty(this, '__FIVE__', config) diff --git a/package.json b/package.json index 0754838..9351cb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gm5/core", - "version": "1.1.2", + "version": "1.1.3", "type": "module", "description": "Five.js, 一个轻量级的nodejs mvc框架 旨在简单易用, 5分钟即可上手", "author": "yutent ",