You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2006/10/13 17:26:26 UTC
svn commit: r463706 - in
/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java:
java/nio/charset/CoderResult.java
org/apache/harmony/niochar/internal/nls/messages.properties
Author: pyang
Date: Fri Oct 13 08:26:25 2006
New Revision: 463706
URL: http://svn.apache.org/viewvc?view=rev&rev=463706
Log:
Make the exception message more helpful
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CoderResult.java
incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/internal/nls/messages.properties
Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CoderResult.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CoderResult.java?view=diff&rev=463706&r1=463705&r2=463706
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CoderResult.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/CoderResult.java Fri Oct 13 08:26:25 2006
@@ -152,8 +152,8 @@
return r;
}
}
- // niochar.08=The length must be positive.
- throw new IllegalArgumentException(Messages.getString("niochar.08")); //$NON-NLS-1$
+ // niochar.08=The length must be positive: {0}.
+ throw new IllegalArgumentException(Messages.getString("niochar.08", length)); //$NON-NLS-1$
}
/**
@@ -181,8 +181,8 @@
return r;
}
}
- // niochar.08=The length must be positive.
- throw new IllegalArgumentException(Messages.getString("niochar.08")); //$NON-NLS-1$
+ // niochar.08=The length must be positive: {0}.
+ throw new IllegalArgumentException(Messages.getString("niochar.08", length)); //$NON-NLS-1$
}
/**
Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/internal/nls/messages.properties?view=diff&rev=463706&r1=463705&r2=463706
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/internal/nls/messages.properties (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/org/apache/harmony/niochar/internal/nls/messages.properties Fri Oct 13 08:26:25 2006
@@ -22,7 +22,7 @@
niochar.05=Malformed input length is {0}.
niochar.06=Replacement string cannot be null or empty.
niochar.07=Replacement string's length cannot be larger than max characters per byte.
-niochar.08=The length must be positive.
+niochar.08=The length must be positive: {0}.
niochar.09=The length of the erroneous input is only meaningful to a malformed-input error or an unmappble character error
niochar.0A=The unmappable character length is {0}.
niochar.0B=Another encoding process is ongoing\!