drop-app/main/plugins/global-error-handler.ts

12 lines
242 B
TypeScript
Raw Permalink Normal View History

export default defineNuxtPlugin((nuxtApp) => {
// Also possible
2025-02-20 21:19:54 +11:00
/*
nuxtApp.hook("vue:error", (error, instance, info) => {
2025-02-20 21:19:54 +11:00
2025-01-20 11:42:09 +11:00
console.error(error, info);
const router = useRouter();
2024-11-04 18:13:03 +11:00
router.replace(`/error`);
});
2025-02-20 21:19:54 +11:00
*/
});