mirror of
https://github.com/thepeacockproject/Peacock
synced 2025-03-27 11:12:44 +01:00
Print a stacktrace for uncaught errors in plugins (if it exists) (#466)
This commit is contained in:
parent
ddc05ad9c7
commit
4dbc0b39de
@ -1106,8 +1106,13 @@ export class Controller {
|
|||||||
|
|
||||||
await (plugin as (controller: Controller) => Promise<void>)(this)
|
await (plugin as (controller: Controller) => Promise<void>)(this)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(LogLevel.ERROR, `Error while evaluating plugin ${pluginName}!`)
|
log(
|
||||||
log(LogLevel.ERROR, e)
|
LogLevel.ERROR,
|
||||||
|
`Error while evaluating plugin ${pluginName}!`,
|
||||||
|
"plugins",
|
||||||
|
)
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
log(LogLevel.ERROR, (e as any)?.stack ?? e, "plugins")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user