summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/java/text/ChoiceFormat.java
diff options
context:
space:
mode:
Diffstat (limited to 'luni/src/main/java/java/text/ChoiceFormat.java')
-rw-r--r--luni/src/main/java/java/text/ChoiceFormat.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/luni/src/main/java/java/text/ChoiceFormat.java b/luni/src/main/java/java/text/ChoiceFormat.java
index e0a1239..014b8c7 100644
--- a/luni/src/main/java/java/text/ChoiceFormat.java
+++ b/luni/src/main/java/java/text/ChoiceFormat.java
@@ -168,10 +168,10 @@ public class ChoiceFormat extends NumberFormat {
next = nextDouble(value.doubleValue());
break;
default:
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("Bad character '" + ch + "' in template: " + template);
}
if (limitCount > 0 && next <= limits[limitCount - 1]) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("Bad template: " + template);
}
buffer.setLength(0);
position.setIndex(index);
@@ -426,7 +426,8 @@ public class ChoiceFormat extends NumberFormat {
*/
public void setChoices(double[] limits, String[] formats) {
if (limits.length != formats.length) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("limits.length != formats.length: " +
+ limits.length + " != " + formats.length);
}
choiceLimits = limits;
choiceFormats = formats;