mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-17 04:00:48 +01:00
perf(core): better communication of internal exceptions
This commit is contained in:
parent
d4888ad8fb
commit
abd46aa322
@ -104,14 +104,14 @@
|
|||||||
"sql-formatter": "^4.0.2",
|
"sql-formatter": "^4.0.2",
|
||||||
"ssh2-promise": "^0.2.0",
|
"ssh2-promise": "^0.2.0",
|
||||||
"v-mask": "^2.2.4",
|
"v-mask": "^2.2.4",
|
||||||
"vue-i18n": "^8.24.4",
|
"vue-i18n": "^8.25.1",
|
||||||
"vuedraggable": "^2.24.3",
|
"vuedraggable": "^2.24.3",
|
||||||
"vuex": "^3.6.2"
|
"vuex": "^3.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/eslint-parser": "^7.15.4",
|
"@babel/eslint-parser": "^7.15.4",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.2",
|
||||||
"electron": "^14.0.0",
|
"electron": "^14.0.1",
|
||||||
"electron-builder": "^22.11.7",
|
"electron-builder": "^22.11.7",
|
||||||
"electron-devtools-installer": "^3.2.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"electron-webpack": "^2.8.2",
|
"electron-webpack": "^2.8.2",
|
||||||
@ -122,12 +122,12 @@
|
|||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-promise": "^5.1.0",
|
"eslint-plugin-promise": "^5.1.0",
|
||||||
"eslint-plugin-vue": "^7.17.0",
|
"eslint-plugin-vue": "^7.17.0",
|
||||||
"sass": "^1.39.2",
|
"sass": "^1.40.0",
|
||||||
"sass-loader": "^10.2.0",
|
"sass-loader": "^10.2.0",
|
||||||
"standard-version": "^9.3.1",
|
"standard-version": "^9.3.1",
|
||||||
"stylelint": "^13.13.1",
|
"stylelint": "^13.13.1",
|
||||||
"stylelint-config-standard": "^22.0.0",
|
"stylelint-config-standard": "^22.0.0",
|
||||||
"stylelint-scss": "^3.20.1",
|
"stylelint-scss": "^3.21.0",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
"vue-template-compiler": "^2.6.14",
|
"vue-template-compiler": "^2.6.14",
|
||||||
"webpack": "^4.46.0"
|
"webpack": "^4.46.0"
|
||||||
|
@ -97,7 +97,16 @@ else {
|
|||||||
app.on('ready', async () => {
|
app.on('ready', async () => {
|
||||||
mainWindow = await createMainWindow();
|
mainWindow = await createMainWindow();
|
||||||
Menu.setApplicationMenu(null);
|
Menu.setApplicationMenu(null);
|
||||||
|
|
||||||
if (isDevelopment)
|
if (isDevelopment)
|
||||||
mainWindow.webContents.openDevTools();
|
mainWindow.webContents.openDevTools();
|
||||||
|
|
||||||
|
process.on('uncaughtException', error => {
|
||||||
|
mainWindow.webContents.send('unhandled-exception', error);
|
||||||
|
});
|
||||||
|
|
||||||
|
process.on('unhandledRejection', error => {
|
||||||
|
mainWindow.webContents.send('unhandled-exception', error);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,14 @@ import Vuex from 'vuex';
|
|||||||
|
|
||||||
import application from './modules/application.store';
|
import application from './modules/application.store';
|
||||||
import settings from './modules/settings.store';
|
import settings from './modules/settings.store';
|
||||||
|
import history from './modules/history.store';
|
||||||
import scratchpad from './modules/scratchpad.store';
|
import scratchpad from './modules/scratchpad.store';
|
||||||
import connections from './modules/connections.store';
|
import connections from './modules/connections.store';
|
||||||
import workspaces from './modules/workspaces.store';
|
import workspaces from './modules/workspaces.store';
|
||||||
import notifications from './modules/notifications.store';
|
import notifications from './modules/notifications.store';
|
||||||
|
|
||||||
import ipcUpdates from './plugins/ipcUpdates';
|
import ipcUpdates from './plugins/ipcUpdates';
|
||||||
|
import ipcExceptions from './plugins/ipcExceptions';
|
||||||
|
|
||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
|
|
||||||
@ -19,12 +21,14 @@ export default new Vuex.Store({
|
|||||||
modules: {
|
modules: {
|
||||||
application,
|
application,
|
||||||
settings,
|
settings,
|
||||||
|
history,
|
||||||
scratchpad,
|
scratchpad,
|
||||||
connections,
|
connections,
|
||||||
workspaces,
|
workspaces,
|
||||||
notifications
|
notifications
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
ipcUpdates
|
ipcUpdates,
|
||||||
|
ipcExceptions
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
7
src/renderer/store/plugins/ipcExceptions.js
Normal file
7
src/renderer/store/plugins/ipcExceptions.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { ipcRenderer } from 'electron';
|
||||||
|
|
||||||
|
export default store => {
|
||||||
|
ipcRenderer.on('unhandled-exception', (event, error) => {
|
||||||
|
store.dispatch('notifications/addNotification', { status: 'error', message: error.message });
|
||||||
|
});
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user