err handl

This commit is contained in:
2025-08-08 01:02:17 +07:00
parent d0f517a0f9
commit 921de8e19c
3 changed files with 14 additions and 10 deletions
+10
View File
@@ -0,0 +1,10 @@
// plugins/error-handler.client.ts
export default defineNuxtPlugin(() => {
window.addEventListener('error', (e) => {
console.error('Client-side Error:', e.message)
})
window.addEventListener('unhandledrejection', (e) => {
console.error('Unhandled Promise Rejection:', e.reason)
})
})