mirror of
https://github.com/thepeacockproject/Peacock
synced 2024-11-22 22:12:45 +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)
|
||||
} catch (e) {
|
||||
log(LogLevel.ERROR, `Error while evaluating plugin ${pluginName}!`)
|
||||
log(LogLevel.ERROR, e)
|
||||
log(
|
||||
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…
Reference in New Issue
Block a user