commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1063736 - /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ErrorMessage.java
Date Wed, 26 Jan 2011 14:39:08 GMT
Author: simonetripodi
Date: Wed Jan 26 14:39:08 2011
New Revision: 1063736

URL: http://svn.apache.org/viewvc?rev=1063736&view=rev
Log:
improved the way to create error messages using the format

Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ErrorMessage.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ErrorMessage.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ErrorMessage.java?rev=1063736&r1=1063735&r2=1063736&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ErrorMessage.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ErrorMessage.java
Wed Jan 26 14:39:08 2011
@@ -42,10 +42,11 @@ final class ErrorMessage {
     /**
      * Create a new {@link ErrorMessage} instance from the error message text.
      *
-     * @param message The error message text
+     * @param messagePattern The error message text pattern
+     * @param arguments  Arguments referenced by the format specifiers in the format string
      */
-    public ErrorMessage(String message) {
-        this(message, null);
+    public ErrorMessage(String messagePattern, Object... arguments) {
+        this(String.format(messagePattern, arguments), (Throwable) null);
     }
 
     /**



Mime
View raw message