From 28e0ee766eeb780493c2e6824bd04291607ca506 Mon Sep 17 00:00:00 2001 From: Dalibor Topic Date: Fri, 9 Jul 2004 14:02:21 +0000 Subject: [PATCH] DateFormat.java (parse): Improved javadoc. 2004-07-09 Dalibor Topic * java/text/DateFormat.java (parse): Improved javadoc. Improved exception message. From-SVN: r84368 --- libjava/ChangeLog | 5 +++++ libjava/java/text/DateFormat.java | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 219b74fc54a..2dcdd5ee40e 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2004-07-09 Dalibor Topic + + * java/text/DateFormat.java (parse): + Improved javadoc. Improved exception message. + 2004-07-09 Mark Wielaard * gnu/java/nio/SelectorImpl.java (select): Call static Thread diff --git a/libjava/java/text/DateFormat.java b/libjava/java/text/DateFormat.java index 3b489fae7eb..81427ebce61 100644 --- a/libjava/java/text/DateFormat.java +++ b/libjava/java/text/DateFormat.java @@ -1,5 +1,6 @@ /* DateFormat.java -- Class for formatting/parsing date/times - Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004 + Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -591,6 +592,7 @@ public abstract class DateFormat extends Format implements Cloneable /** * This method parses the specified date/time string. * + * @param source The string to parse. * @return The resultant date. * * @exception ParseException If the specified string cannot be parsed. @@ -604,7 +606,8 @@ public abstract class DateFormat extends Format implements Cloneable int index = pos.getErrorIndex(); if (index < 0) index = pos.getIndex(); - throw new ParseException("invalid Date syntax", index); + throw new ParseException("invalid Date syntax in \"" + + source + '\"', index); } return result; } -- 2.30.2