You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ge...@apache.org on 2001/07/03 22:22:16 UTC

cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime/directive Parse.java

geirm       01/07/03 13:22:14

  Modified:    src/java/org/apache/velocity/runtime/directive Parse.java
  Log:
  Added MIE propogation for #parse() as well.  Another from
  Michael Salmon (ms@collab.net)
  
  Revision  Changes    Path
  1.19      +11 -2     jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Parse.java
  
  Index: Parse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Parse.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Parse.java	2001/04/22 23:08:42	1.18
  +++ Parse.java	2001/07/03 20:22:06	1.19
  @@ -86,7 +86,7 @@
    * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
    * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
    * @author <a href="mailto:Christoph.Reck@dlr.de">Christoph Reck</a>
  - * @version $Id: Parse.java,v 1.18 2001/04/22 23:08:42 geirm Exp $
  + * @version $Id: Parse.java,v 1.19 2001/07/03 20:22:06 geirm Exp $
    */
   public class Parse extends Directive
   {
  @@ -189,7 +189,16 @@
           }
           catch ( Exception e )
           {        
  -            Runtime.error( "Parse.render() : " + e );
  +            /*
  +             *  if it's a MIE, it came from the render.... throw it...
  +             */
  +
  +            if ( e instanceof MethodInvocationException)
  +            {
  +                throw (MethodInvocationException) e;
  +            }
  +
  +            Runtime.error( "Exception rendering #parse( " + arg + " )  : " + e );
               return false;
           }
           finally