1
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) ()

This commit is contained in:
Govert de Gans 2024-06-03 03:15:08 +02:00 committed by GitHub
parent ddc05ad9c7
commit 4dbc0b39de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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")
} }
} }