增加uncaughtException事件监听

v1 1.1.3
yutent 2022-12-21 11:47:18 +08:00
parent a135007f35
commit 9a7421c4af
2 changed files with 6 additions and 4 deletions

View File

@ -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)

View File

@ -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 <yutent.io@gmail.com>",