cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r126532 - /cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/XConfToolTask.java
Date Wed, 26 Jan 2005 19:20:43 GMT
Author: cziegeler
Date: Wed Jan 26 11:20:42 2005
New Revision: 126532

URL: http://svn.apache.org/viewcvs?view=rev&rev=126532
Log:
Better error message when xpath attribute is missing
Modified:
   cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/XConfToolTask.java

Modified: cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/XConfToolTask.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/XConfToolTask.java?view=diff&rev=126532&p1=cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/XConfToolTask.java&r1=126531&p2=cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/XConfToolTask.java&r2=126532
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/XConfToolTask.java	(original)
+++ cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/XConfToolTask.java	Wed Jan 26 11:20:42
2005
@@ -238,7 +238,9 @@
 
         // Get 'root' node were 'component' will be inserted into
         String xpath = getAttribute(elem, "xpath", replaceProperties);
-
+        if ( xpath == null ) {
+            throw new IOException("Attribute 'xpath' is required.");    
+        }
         NodeList nodes = XPathAPI.selectNodeList(configuration, xpath);
 
         // Suspend, because the xpath returned not one node

Mime
View raw message