From 609582ab138072dc65186a55ba6e34e10177e0ea Mon Sep 17 00:00:00 2001 From: AlexHalbesleben Date: Sat, 17 Sep 2022 14:30:56 -0500 Subject: [PATCH] debugging is stupid --- src/App.vue | 6 ------ src/store/index.vuex.ts | 11 ++++++++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/App.vue b/src/App.vue index 22f63c3..1ce92fc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -66,12 +66,6 @@ export default class App extends Vue { } mounted() { - window.addEventListener("error", (ev: ErrorEvent) => { - alert("ERROR"); - alert(ev.message); - alert(`${ev.lineno}:${ev.colno}`); - alert(JSON.stringify(ev.error, null, 2)); - }); window.addEventListener("keydown", (ev: KeyboardEvent) => { const changelogModal = this.$refs.changelogModal as ChangelogModal; diff --git a/src/store/index.vuex.ts b/src/store/index.vuex.ts index 5baed67..14a0e68 100644 --- a/src/store/index.vuex.ts +++ b/src/store/index.vuex.ts @@ -340,7 +340,16 @@ export class Store extends VuexModule { .map((chunk) => chunk.task) .filter((task) => !this.tasks.includes(task)); - this.updateChunks(); + try { + this.updateChunks(); + } catch (e) { + if (e instanceof Error) { + alert(`ERROR: ${e.name}`); + alert(`message: ${e.message}`); + alert(`stack:\n ${e.stack}`); + alert(`cause: ${e.cause}`); + } + } } }