You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/03/12 01:42:39 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/templates ElemTemplateElement.java StylesheetRoot.java

sboag       01/03/11 16:42:39

  Modified:    java/src/org/apache/xalan/templates ElemTemplateElement.java
                        StylesheetRoot.java
  Log:
  Minor changes to better bottleneck throwing of Runtime exceptions
  during processing.
  
  Revision  Changes    Path
  1.37      +13 -1     xml-xalan/java/src/org/apache/xalan/templates/ElemTemplateElement.java
  
  Index: ElemTemplateElement.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemTemplateElement.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- ElemTemplateElement.java	2001/01/25 18:50:23	1.36
  +++ ElemTemplateElement.java	2001/03/12 00:42:38	1.37
  @@ -274,10 +274,22 @@
   
       String themsg = XSLMessages.createMessage(msg, args);
   
  -    throw new RuntimeException(
  +    error(
         XSLMessages.createMessage(
           XSLTErrorResources.ER_ELEMTEMPLATEELEM_ERR, new Object[]{ themsg }));  //"ElemTemplateElement error: "+msg);
     }
  +  
  +  /**
  +   * Throw a template element runtime error.  (Note: should we throw a TransformerException instead?)
  +   *
  +   * @param msg Description of the error that occured.
  +   * @param args Arguments to be used in the message
  +   */
  +  public void error(String msg)
  +  {
  +    throw new RuntimeException(msg);
  +  }
  +  
   
     // Implemented DOM Element methods.
   
  
  
  
  1.39      +1 -1      xml-xalan/java/src/org/apache/xalan/templates/StylesheetRoot.java
  
  Index: StylesheetRoot.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/StylesheetRoot.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- StylesheetRoot.java	2001/01/07 06:24:40	1.38
  +++ StylesheetRoot.java	2001/03/12 00:42:38	1.39
  @@ -555,7 +555,7 @@
                             new Object[] {dfp.getName()});
         }
   
  -      throw new RuntimeException(themsg);   // Should we throw TransformerException instead?
  +      error(themsg);   // Should we throw TransformerException instead?
       }
   
     }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org