summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2010-09-27 16:53:25 -0700
committerElliott Hughes <enh@google.com>2010-09-27 16:53:25 -0700
commita8bc3bd2794b36c5e935aff7b932a7945e98bf30 (patch)
tree24a42c2a6bb2c8c18740be080914cc725a97ca3c
parentf3cc41ede7af1dd683e1a55eabc8f36963aec8ab (diff)
downloadlibcore-a8bc3bd2794b36c5e935aff7b932a7945e98bf30.zip
libcore-a8bc3bd2794b36c5e935aff7b932a7945e98bf30.tar.gz
libcore-a8bc3bd2794b36c5e935aff7b932a7945e98bf30.tar.bz2
Improve DateFormat.parse's exception detail.
Bug: 3041734 Change-Id: I73e9d2aefecc5fe67415eb3a6586294f8dbbcb82
-rw-r--r--luni/src/main/java/java/text/DateFormat.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/luni/src/main/java/java/text/DateFormat.java b/luni/src/main/java/java/text/DateFormat.java
index b9d88e8..45ee0c7 100644
--- a/luni/src/main/java/java/text/DateFormat.java
+++ b/luni/src/main/java/java/text/DateFormat.java
@@ -623,7 +623,8 @@ public abstract class DateFormat extends Format {
ParsePosition position = new ParsePosition(0);
Date date = parse(string, position);
if (position.getIndex() == 0) {
- throw new ParseException("Unparseable date " + string, position.getErrorIndex());
+ throw new ParseException("Unparseable date: \"" + string + "\"",
+ position.getErrorIndex());
}
return date;
}