err handling
This commit is contained in:
@@ -304,6 +304,7 @@ module.exports = {
|
|||||||
this.showGcodeMessage = true;
|
this.showGcodeMessage = true;
|
||||||
|
|
||||||
while (this.showGcodeMessage) {
|
while (this.showGcodeMessage) {
|
||||||
|
try {
|
||||||
const toolpath = await api.get(`path/${file}`);
|
const toolpath = await api.get(`path/${file}`);
|
||||||
this.toolpath_progress = toolpath.progress;
|
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 () {
|
delete_current: function () {
|
||||||
if (this.config.macros_list.find(item => item.file_name == this.state.selected) == undefined) {
|
if (this.config.macros_list.find(item => item.file_name == this.state.selected) == undefined) {
|
||||||
if (this.state.selected) {
|
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}`);
|
api.delete(`file/${this.state.selected}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user