mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 10:34:17 +00:00
use try & catch
This commit is contained in:
parent
c4b0fbafea
commit
1542b8982c
@ -126,6 +126,7 @@ async function injectEnvFromInfisical() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function Boot(main) {
|
async function Boot(main) {
|
||||||
|
try {
|
||||||
if (!main) {
|
if (!main) {
|
||||||
throw new Error("main class is not defined")
|
throw new Error("main class is not defined")
|
||||||
}
|
}
|
||||||
@ -146,6 +147,10 @@ async function Boot(main) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return instance
|
return instance
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`[BOOT] Booting in [${global.isProduction ? "production" : "development"}] mode...`)
|
console.log(`[BOOT] Booting in [${global.isProduction ? "production" : "development"}] mode...`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user