testing global error handling
This commit is contained in:
parent
89d3bc3cce
commit
ac538da1d8
2 changed files with 9 additions and 0 deletions
|
|
@ -467,6 +467,11 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => {
|
|||
// "Plugins are only applied to stores created after the plugins themselves, and after pinia is passed to the app, otherwise they won't be applied."
|
||||
app.use(pinia)
|
||||
|
||||
app.config.errorHandler = (error, instance, info) => {
|
||||
console.error('GLOBAL ERROR HANDLER', error, instance, info)
|
||||
useInterfaceStore().setGlobalError({ error, instance, info })
|
||||
}
|
||||
|
||||
const waitForAllStoresToLoad = async () => {
|
||||
// the stores that do not persist technically do not need to be awaited here,
|
||||
// but that involves either hard-coding the stores in some place (prone to errors)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue