Skip to content

Commit

Permalink
report errors to user
Browse files Browse the repository at this point in the history
  • Loading branch information
Igigog committed Oct 23, 2023
1 parent 20e1932 commit ac15f37
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ export default {
else {
this.validated = true
}
})
}).catch((e) => {
this.$q.notify({ type: 'negative', message: e })
})
}
},
tab() {
Expand Down Expand Up @@ -168,6 +170,8 @@ export default {
config.name = this.tabs[this.tab].name
config.state = structuredClone(toRaw(this.tabs[this.tab].state))
this.tabs[this.tab] = config
}).catch((e) => {
this.$q.notify({ type: 'negative', message: e })
})
},
readDefaultConfiguration(filename) {
Expand Down Expand Up @@ -254,7 +258,9 @@ export default {
}
}
invoke('write_config', { config: sendConfig }).then(() => {})
invoke('write_config', { config: sendConfig }).then(() => {}).catch((e) => {
this.$q.notify({ type: 'negative', message: e })
})
}
}, 5),
saveState: debounce(function () {
Expand Down Expand Up @@ -377,6 +383,8 @@ export default {
invoke('open', { serialNumber: this.device }).then(() => {
this.$q.notify({ type: 'positive', message: "Device connected" })
this.connected = true
}).catch((e) => {
this.$q.notify({ type: 'negative', message: e })
})
},
pollDevices() {
Expand Down Expand Up @@ -420,6 +428,8 @@ export default {
}
}
}
}).catch((e) => {
this.$q.notify({ type: 'negative', message: e })
})
}
}
Expand Down

0 comments on commit ac15f37

Please sign in to comment.