fix: 删除一处不需要的文件
This commit is contained in:
parent
ee57c1e932
commit
d8d78edde1
|
|
@ -1,26 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const types_1 = require("oak-domain/lib/types");
|
||||
const handlers = [async (ctx, type, msg, err) => {
|
||||
if (type === 'aspect' || type === 'watcher' || type === 'timer') {
|
||||
if (err && err instanceof types_1.OakUserException) {
|
||||
// 用户异常,不处理
|
||||
console.warn(`[${type} User Error] ${msg}: ${err.message}`);
|
||||
return;
|
||||
}
|
||||
else if (err instanceof types_1.OakException) {
|
||||
// 框架异常,记录日志 ctx.xxxx
|
||||
console.log(`[${type} Error] ${msg}: ${err.message}`);
|
||||
}
|
||||
else {
|
||||
if (err) {
|
||||
console.error(`[${type} Error] ${msg}: ${err.stack}`);
|
||||
}
|
||||
else {
|
||||
console.error(`[${type} Error] ${msg}: Unknown error`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}];
|
||||
exports.default = handlers;
|
||||
//# sourceMappingURL=exception.js.map
|
||||
Loading…
Reference in New Issue