Skip to content

Commit

Permalink
feat(projects): add app error handler. close #587
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Sep 7, 2024
1 parent 27b5222 commit be8556c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/plugins/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import { h } from 'vue';
import type { App } from 'vue';
import { NButton } from 'naive-ui';
import { $t } from '@/locales';

export function setupAppErrorHandle(app: App) {
app.config.errorHandler = (err, vm, info) => {
// eslint-disable-next-line no-console
console.error(err, vm, info);
};
}

export function setupAppVersionNotification() {
const canAutoUpdateApp = import.meta.env.VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y';

Expand Down

0 comments on commit be8556c

Please sign in to comment.