图形状态处理添加异常捕获,不影响其他对象处理

This commit is contained in:
walker 2023-08-04 11:11:05 +08:00
parent 643ec9bfaf
commit d13ffcc041

View File

@ -537,6 +537,7 @@ export class GraphicApp extends EventEmitter<GraphicAppEvents> {
state.code,
state.graphicType
);
try {
if (!g) {
const template = this.getGraphicTemplatesByType(state.graphicType);
const g = template.new();
@ -545,6 +546,10 @@ export class GraphicApp extends EventEmitter<GraphicAppEvents> {
} else if (g.updateStates(state)) {
g.repaint();
}
} catch (err) {
console.error('图形状态处理异常', g, state, err);
throw err;
}
});
}