[Sie-announce] SIEコード [1446] beginElementメソッドに例外処理をした

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 12月 4日 (金) 23:30:17 JST


Revision: 1446
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1446
Author:   dhrname
Date:     2009-12-04 23:30:17 +0900 (Fri, 04 Dec 2009)

Log Message:
-----------
beginElementメソッドに例外処理をした

Modified Paths:
--------------
    branches/05x/055/sie.js

Modified: branches/05x/055/sie.js
===================================================================
--- branches/05x/055/sie.js	2009-12-04 14:25:27 UTC (rev 1445)
+++ branches/05x/055/sie.js	2009-12-04 14:30:17 UTC (rev 1446)
@@ -2301,40 +2301,44 @@
 STSetElement.prototype.beginElement = function (){
   var target = this.target;
   var base = target[this.attributeName];
-  //fill要素とstroke要素はあらかじめ消しておく
-  if ( !(target instanceof STGroupElement) ) {
-     var tgebtfill = target.tar.getElementsByTagName("fill"), tgebtstroke = target.tar.getElementsByTagName("stroke");
-     if (tgebtfill.length > 0) {
-       target.tar.removeChild(tgebtfill[0]);
+  try {
+    //fill要素とstroke要素はあらかじめ消しておく
+    if ( !(target instanceof STGroupElement) ) {
+       var tgebtfill = target.tar.getElementsByTagName("fill"), tgebtstroke = target.tar.getElementsByTagName("stroke");
+       if (tgebtfill.length > 0) {
+         target.tar.removeChild(tgebtfill[0]);
+       }
+       if (tgebtstroke.length > 0) {
+         target.tar.removeChild(tgebtstroke[0]);
+       }
      }
-     if (tgebtstroke.length > 0) {
-       target.tar.removeChild(tgebtstroke[0]);
-     }
-   }
-  if (base !== void 0) {
-    if (typeof base === "string") {
-      target[this.attributeName] = this.to;
-    } else if (base instanceof STLength) {
-      var s = base.value;
-      base.newValueSpecifiedUnits(base.unitType, parseFloat(this.to));
-      base = s;
-    }
-  } else if (target.paint.defaults[this.attributeName] !== void 0) {
-    base = target.paint[this.attributeName];
-    target.paint[this.attributeName] = this.to;
-  } else {
-    base = "";
-    target.tar.style[this.attributeName] = this.to;
-  }
-  target.set(this.w, this.h);
-  this.base = base;
-  if (this.simpleDuration) {
-    if (this._end) {
-      var offset = (this.simpleDuration > this._end - this._begin) ? this._end - this._begin : this.simpleDuration;
-      this.endElementAt(offset);
+    if (base !== void 0) {
+      if (typeof base === "string") {
+        target[this.attributeName] = this.to;
+      } else if (base instanceof STLength) {
+        var s = base.value;
+        base.newValueSpecifiedUnits(base.unitType, parseFloat(this.to));
+        base = s;
+      }
+    } else if (target.paint.defaults[this.attributeName] !== void 0) {
+      base = target.paint[this.attributeName];
+      target.paint[this.attributeName] = this.to;
     } else {
-      this.endElementAt(this.simpleDuration);
+      base = "";
+      target.tar.style[this.attributeName] = this.to;
     }
+    target.set(this.w, this.h);
+    this.base = base;
+    if (this.simpleDuration) {
+      if (this._end) {
+        var offset = (this.simpleDuration > this._end - this._begin) ? this._end - this._begin : this.simpleDuration;
+        this.endElementAt(offset);
+      } else {
+        this.endElementAt(this.simpleDuration);
+      }
+    }
+  } catch(e) {
+    stlog.add(e, 23400);
   }
   return;
 };




Sie-announce メーリングリストの案内
Back to archive index