lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject svn commit: r380207 - /lucene/java/trunk/src/java/org/apache/lucene/document/DateField.java
Date Thu, 23 Feb 2006 19:53:29 GMT
Author: dnaber
Date: Thu Feb 23 11:53:26 2006
New Revision: 380207

URL: http://svn.apache.org/viewcvs?rev=380207&view=rev
Log:
improve exception message

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/document/DateField.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/document/DateField.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/document/DateField.java?rev=380207&r1=380206&r2=380207&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/document/DateField.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/document/DateField.java Thu Feb 23 11:53:26
2006
@@ -76,12 +76,13 @@
    */
   public static String timeToString(long time) {
     if (time < 0)
-      throw new RuntimeException("time too early");
+      throw new RuntimeException("time '" + time + "' is too early, must be >= 0");
 
     String s = Long.toString(time, Character.MAX_RADIX);
 
     if (s.length() > DATE_LEN)
-      throw new RuntimeException("time too late");
+      throw new RuntimeException("time '" + time + "' is too late, length of string " +
+          "representation must be <= " + DATE_LEN);
 
     // Pad with leading zeros
     if (s.length() < DATE_LEN) {



Mime
View raw message