Ignore:
Timestamp:
2009-07-02 15:06:52 (3 years ago)
Author:
bruno
Message:

Introduce a TemplateException? class, and use that in the template code instead of a generic RuntimeException?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/ImportBlock.java

    r1111 r1346  
    6565            String expression = attributes.getValue(SRC); 
    6666            if (expression == null) 
    67                 throw new RuntimeException(SRC + " attribute is required on " + templateBlock.getSaxElement().getName()); 
     67                throw new TemplateException(SRC + " attribute is required on " + templateBlock.getSaxElement().getName()); 
    6868            sourceExpression = elFacade.createExpression(expression, String.class); 
    6969            String mode = attributes.getValue(MODE); 
     
    8787                imported = templateService.buildTemplate(sourceLocation, context, context.isSilencing()); 
    8888            } catch (Exception ex) { 
    89                 throw new RuntimeException("Error parsing template included at location " + getLocation(), ex); 
     89                throw new TemplateException("Error parsing template included at location " + getLocation(), ex); 
    9090            } 
    9191 
     
    9393            // detect recursion 
    9494            if (old != null) { 
    95                 throw new RuntimeException("KTL: recursion is not allowed in import, location " 
     95                throw new TemplateException("KTL: recursion is not allowed in import, location " 
    9696                        + getLocation()); 
    9797            } 
Note: See TracChangeset for help on using the changeset viewer.