logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1436715 - /logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
Date Tue, 22 Jan 2013 01:35:32 GMT
Author: ggregory
Date: Tue Jan 22 01:35:32 2013
New Revision: 1436715

URL: http://svn.apache.org/viewvc?rev=1436715&view=rev
Log:
Better error message using the constant.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java?rev=1436715&r1=1436714&r2=1436715&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
Tue Jan 22 01:35:32 2013
@@ -57,7 +57,8 @@ public class StructuredDataId implements
         int index = -1;
         if (name != null) {
             if (name.length() > MAX_LENGTH) {
-                throw new IllegalArgumentException("Length of id exceeds maximum of 32 characters:
" + name);
+                throw new IllegalArgumentException(String.format("Length of id %s exceeds
maximum of %d characters",
+                        MAX_LENGTH, name));
             }
             index = name.indexOf("@");
         }



Mime
View raw message