Skip to content

Commit 1d5d3cb

Browse files
committed
chore: log error when configuring view
1 parent 3c34e39 commit 1d5d3cb

File tree

1 file changed

+19
-13
lines changed
  • spring-boot-admin-server-ui/src/main/frontend

1 file changed

+19
-13
lines changed

spring-boot-admin-server-ui/src/main/frontend/index.js

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ import moment from 'moment';
1818
import { createApp, h, reactive } from 'vue';
1919
import { useI18n } from 'vue-i18n';
2020

21+
22+
2123
import './index.css';
2224

25+
26+
2327
import components from './components';
2428
import { createViewRegistry } from './composables/ViewRegistry.js';
25-
import {
26-
createApplicationStore,
27-
useApplicationStore,
28-
} from './composables/useApplicationStore.js';
29+
import { createApplicationStore, useApplicationStore } from './composables/useApplicationStore.js';
2930
import i18n from './i18n';
3031
import { worker } from './mocks/browser';
3132
import Notifications from './notifications.js';
@@ -36,6 +37,7 @@ import sbaShell from './shell/index.vue';
3637
import axios from './utils/axios.js';
3738
import views from './views';
3839

40+
3941
moment.locale(navigator.language.split('-')[0]);
4042

4143
const applicationStore = createApplicationStore();
@@ -84,12 +86,16 @@ app.use(router(viewRegistry.routes));
8486

8587
const vue = app.mount('#app');
8688

87-
installables.forEach((view) =>
88-
view.configure
89-
? view.configure({
90-
vue,
91-
i18n: vue.$i18n,
92-
axios,
93-
})
94-
: void 0
95-
);
89+
installables.forEach((view) => {
90+
try {
91+
view.configure
92+
? view.configure({
93+
vue,
94+
i18n: vue.$i18n,
95+
axios,
96+
})
97+
: void 0;
98+
} catch (e) {
99+
console.error(`Error configuring view ${view}`, e);
100+
}
101+
});

0 commit comments

Comments
 (0)