feat: 점검 작업 중
This commit is contained in:
12
layers/plugins/error-handler.ts
Normal file
12
layers/plugins/error-handler.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
nuxtApp.vueApp.config.errorHandler = (error, instance, info) => {
|
||||
console.log("🚀 000000 ~ error:", error)
|
||||
// handle error, e.g. report to a service
|
||||
}
|
||||
|
||||
// Also possible
|
||||
nuxtApp.hook('vue:error', (error, instance, info) => {
|
||||
console.log("🚀1111 ~ error:", error)
|
||||
// handle error, e.g. report to a service
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user