增加命令的错误处理

pull/77/MERGE
ChenX 6 years ago
parent c4878ba17a
commit 35eab74d83

@ -30,7 +30,15 @@ export class CommandMachine
//命令执行...
this.m_CommandIng = true;
app.m_Editor.m_CommandStore.isCmdIng = true;
await this.m_CommandList.get(cmdName).exec(ss);
try
{
await this.m_CommandList.get(cmdName).exec(ss);
}
catch (error)
{
app.m_Editor.m_CommandStore.Prompt("抱歉,命令造成了错误,请联系开发人员.");
console.error(error);
}
this.CommandEnd(cmdName);
}
else

Loading…
Cancel
Save