Skip to content

Commit 60366c2

Browse files
committed
feat(projects): add app error handler
1 parent 5ae17e6 commit 60366c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/plugins/app.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
import { h } from 'vue';
2+
import type { App } from 'vue';
23
import { Button } from 'ant-design-vue';
34
import { $t } from '@/locales';
45

6+
export function setupAppErrorHandle(app: App) {
7+
app.config.errorHandler = (err, vm, info) => {
8+
// eslint-disable-next-line no-console
9+
console.error(err, vm, info);
10+
};
11+
}
12+
513
export function setupAppVersionNotification() {
614
const canAutoUpdateApp = import.meta.env.VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y';
715

0 commit comments

Comments
 (0)