maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r812399 - /maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
Date Tue, 08 Sep 2009 08:57:35 GMT
Author: ltheussl
Date: Tue Sep  8 08:57:35 2009
New Revision: 812399

URL: http://svn.apache.org/viewvc?rev=812399&view=rev
Log:
[DOXIA-367] Better error message

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java?rev=812399&r1=812398&r2=812399&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
Tue Sep  8 08:57:35 2009
@@ -464,7 +464,8 @@
 
                                 if ( hash.endsWith( ".html" ) && !hash.startsWith(
"./" ) )
                                 {
-                                    String msg = "Ambiguous link: '" + hash + "'. If this
is a local link, prepend \"./\"!";
+                                    String msg = "Ambiguous link: '" + hash
+                                            + "'. If this is a local link, prepend \"./\"!";
                                     logMessage( "ambiguousLink", msg );
                                 }
 
@@ -2890,6 +2891,11 @@
             {
                 String[] param = StringUtils.split( params[i], "=" );
 
+                if ( param.length == 1 )
+                {
+                    throw new AptParseException( "Missing 'key=value' pair for macro parameter:
" + params[i] );
+                }
+
                 String key = unescapeForMacro( param[0] );
                 String value = unescapeForMacro( param[1] );
 



Mime
View raw message