浏览代码

Update 'src/app/core/models/application/actions/action.js'

Previous debug message was provoking error in crationg of second Circumference c1: c0:=Circumference(A,B); c1:=Circumference(B,A);
In "constructor()" added try/catch to allow work under error
leo 2 年之前
父节点
当前提交
679b6cf2e2
共有 1 个文件被更改,包括 18 次插入13 次删除
  1. 18 13
      src/app/core/models/application/actions/action.js

+ 18 - 13
src/app/core/models/application/actions/action.js

@@ -17,19 +17,24 @@ import { GEO_FILE } from "../../../enums/geo-file-enum";
 export class Action {
 
   constructor (genericObject) {
-    console.log("action.js!constructor(): "); //D
-    this.id = genericObject.id;
-    this.type = genericObject.elementClass;
-    this.definition = this.r(genericObject.definitions.map(x => x.id).toString());
-    this.list = this.r(genericObject.dependentsOnThis.map(x => x.id).toString());
-    this.label = genericObject.labelIgeom;
-    this.defined = genericObject.defined;
-    this.color = genericObject.color;
-    this.hidden = genericObject.visible ? 0 : 1;
-    this.pixel = "";
-    this.font = "";
-    this.labelColor = genericObject.labelColor;
-    this.genericObject = genericObject;
+    var auxE = "1, ";
+    try {
+      console.log("action.js!constructor(genericObject): this.id=" + (genericObject.id!=undefined ? genericObject.id : "<>")); //D
+      this.id = genericObject.id; auxE += "2, "; //D
+      this.type = genericObject.elementClass; auxE += "3, "; //D
+      this.definition = this.r(genericObject.definitions.map(x => x.id).toString()); auxE += "4, "; //D
+      this.list = this.r(genericObject.dependentsOnThis.map(x => x.id).toString()); auxE += "5, "; //D
+      this.label = genericObject.labelIgeom; auxE += "6, "; //D
+      this.defined = genericObject.defined; auxE += "7, "; //D
+      this.color = genericObject.color; auxE += "8, "; //D
+      this.hidden = genericObject.visible ? 0 : 1; auxE += "9, "; //D
+      this.pixel = "";
+      this.font = "";
+      this.labelColor = genericObject.labelColor; auxE += "10, "; //D
+      this.genericObject = genericObject;
+    } catch (error) {
+      console.log("action.js!constructor(genericObject): Error '" + error + "', with " + auxE);
+      }
     }
 
   do () {