Skip to content

Commit

Permalink
debugging is stupid
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHalbesleben committed Sep 17, 2022
1 parent 438eb61 commit 609582a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 10 additions & 1 deletion src/store/index.vuex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
}
}
}

Expand Down

0 comments on commit 609582a

Please sign in to comment.