err handling

This commit is contained in:
sanjayk03-dev
2024-03-27 02:14:14 +05:30
parent e7f0c259a2
commit 649b1ea3f1
2 changed files with 21 additions and 15 deletions

View File

@@ -304,6 +304,7 @@ module.exports = {
this.showGcodeMessage = true;
while (this.showGcodeMessage) {
try {
const toolpath = await api.get(`path/${file}`);
this.toolpath_progress = toolpath.progress;
@@ -322,6 +323,9 @@ module.exports = {
}
}
}
} catch (error) {
console.error(error);
}
}
},
@@ -445,7 +449,9 @@ module.exports = {
delete_current: function () {
if (this.config.macros_list.find(item => item.file_name == this.state.selected) == undefined) {
if (this.state.selected) {
this.config.non_macros_list = this.config.non_macros_list.filter(item => item.file_name != this.state.selected);
this.config.non_macros_list = this.config.non_macros_list.filter(
item => item.file_name != this.state.selected,
);
api.delete(`file/${this.state.selected}`);
}
} else {