图形状态处理添加异常捕获,不影响其他对象处理
This commit is contained in:
parent
643ec9bfaf
commit
d13ffcc041
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user