Changeset 1346 for trunk/universe/kauri-template/src/main/java/org/kauriproject/template/DefaultTemplateBuilder.java
- Timestamp:
- 2009-07-02 15:06:52 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/universe/kauri-template/src/main/java/org/kauriproject/template/DefaultTemplateBuilder.java
r1344 r1346 139 139 xmlReader.parse(is); 140 140 } catch (Exception ex) { 141 throw new RuntimeException("Error parsing template file " + source.getReference(), ex);141 throw new TemplateException("Error parsing template file " + source.getReference(), ex); 142 142 } finally { 143 143 IOUtils.closeQuietly(in); … … 160 160 parser = factory.newSAXParser(); 161 161 } catch (SAXException saxex) { 162 log.error(saxex);162 throw new TemplateException(saxex); 163 163 } catch (ParserConfigurationException parsex) { 164 log.error(parsex);164 throw new TemplateException(parsex); 165 165 } 166 166 return parser; … … 396 396 blocksPushed++; 397 397 if (macroRegistry.containsKey(macroblock.getName())) { 398 throw new RuntimeException("A macro with name " + macroblock.getName()398 throw new TemplateException("A macro with name " + macroblock.getName() 399 399 + " is already defined, location " 400 400 + macroblock.getStartStep().getLocation()); … … 417 417 418 418 if (parentBlock == null) { 419 throw new RuntimeException(419 throw new TemplateException( 420 420 "Parameter must appear as a direct child in a macro or callMacro element, location " 421 421 + parameterblock.getStartStep().getLocation()); … … 435 435 blocksPushed++; 436 436 if (inheritanceRegistry.containsKey(inheritblock.getName())) { 437 throw new RuntimeException("A block with name " + inheritblock.getName()437 throw new TemplateException("A block with name " + inheritblock.getName() 438 438 + " is already defined, location " 439 439 + inheritblock.getStartStep().getLocation()); … … 445 445 attributes), parent); 446 446 if (parent == null) { 447 throw new RuntimeException(447 throw new TemplateException( 448 448 "A call to a superBlock is only possible from within an overriding block, location " 449 449 + superblock.getStartStep().getLocation());
Note: See TracChangeset
for help on using the changeset viewer.