2003/12/16 23:01:41
[org.ibex.core.git] / src / org / xwt / Template.java
index b11cf7c..1d39655 100644 (file)
@@ -106,8 +106,20 @@ public class Template {
      *  @param pboxes a vector of all box parents on which to put $-references
      *  @param ptemplates a vector of the fileNames to recieve private references on the pboxes
      */
-    void apply(Box b, XWT xwt) throws JSExn { apply(b, xwt, null); }
-    void apply(Box b, XWT xwt, PerInstantiationJSScope parentPis) throws JSExn {
+    void apply(Box b, XWT xwt) {
+        try {
+            apply(b, xwt, null);
+        } catch (JSExn e) {
+            b.clear(b.VISIBLE);
+            b.mark_for_repack();
+            Log.log(Template.class, "WARNING: exception (below) thrown during application of template;");
+            Log.log(Template.class, "         setting visibility of target box to \"false\"");
+            Log.logJS(e);
+        }
+    }
+
+
+    private void apply(Box b, XWT xwt, PerInstantiationJSScope parentPis) throws JSExn {
 
         getStatic();