feat: 异常处理器改为从lib/configuration/exception导入
This commit is contained in:
parent
23865e639d
commit
2d8690abb6
|
|
@ -41,10 +41,10 @@ function concat(...paths) {
|
||||||
async function startup(path, connector, omitWatchers, omitTimers, routine) {
|
async function startup(path, connector, omitWatchers, omitTimers, routine) {
|
||||||
let errorHandler = undefined;
|
let errorHandler = undefined;
|
||||||
try {
|
try {
|
||||||
errorHandler = require((0, path_1.join)(path, 'lib', 'configuration', 'errors')).default;
|
errorHandler = require((0, path_1.join)(path, 'lib', 'configuration', 'exception')).default;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
// 不存在errors配置
|
// 不存在exception配置
|
||||||
}
|
}
|
||||||
const serverConfiguration = require((0, path_1.join)(path, 'lib', 'configuration', 'server')).default;
|
const serverConfiguration = require((0, path_1.join)(path, 'lib', 'configuration', 'server')).default;
|
||||||
// 拿到package.json,用作项目的唯一标识,否则无法区分不同项目的Redis+socketIO连接
|
// 拿到package.json,用作项目的唯一标识,否则无法区分不同项目的Redis+socketIO连接
|
||||||
|
|
|
||||||
|
|
@ -64,10 +64,10 @@ export async function startup<ED extends EntityDict & BaseEntityDict, FrontCxt e
|
||||||
path,
|
path,
|
||||||
'lib',
|
'lib',
|
||||||
'configuration',
|
'configuration',
|
||||||
'errors'
|
'exception'
|
||||||
)).default;
|
)).default;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// 不存在errors配置
|
// 不存在exception配置
|
||||||
}
|
}
|
||||||
|
|
||||||
const serverConfiguration: ServerConfiguration = require(join(
|
const serverConfiguration: ServerConfiguration = require(join(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue