jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1366865 - in /jena/trunk: jena-arq/src/main/java/org/openjena/atlas/lib/NumberUtils.java jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/DateTimeNode.java
Date Sun, 29 Jul 2012 16:05:14 GMT
Author: andy
Date: Sun Jul 29 16:05:14 2012
New Revision: 1366865

URL: http://svn.apache.org/viewvc?rev=1366865&view=rev
Log:
Add some debugging code.

Modified:
    jena/trunk/jena-arq/src/main/java/org/openjena/atlas/lib/NumberUtils.java
    jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/DateTimeNode.java

Modified: jena/trunk/jena-arq/src/main/java/org/openjena/atlas/lib/NumberUtils.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/openjena/atlas/lib/NumberUtils.java?rev=1366865&r1=1366864&r2=1366865&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/openjena/atlas/lib/NumberUtils.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/openjena/atlas/lib/NumberUtils.java Sun Jul 29 16:05:14
2012
@@ -92,7 +92,7 @@ public class NumberUtils
             sb.append(chars[width-1-i]) ;
     }
 
-    // No checking.
+    // No checking.  char[] filled backwards
     private static int formatUnsignedInt(char[] b, int x, int width)
     {
         // x >= 0 
@@ -112,7 +112,7 @@ public class NumberUtils
         }
         
         if ( x != 0 )
-            throw new AtlasException("formatInt: overflow") ;
+            throw new AtlasException("formatInt: overflow[x="+x+", width="+width+"]") ;
         
         while ( width > 0 )
         {

Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/DateTimeNode.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/DateTimeNode.java?rev=1366865&r1=1366864&r2=1366865&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/DateTimeNode.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/DateTimeNode.java Sun Jul
29 16:05:14 2012
@@ -177,12 +177,24 @@ public class DateTimeNode
 
     public static String unpackDateTime(long v)
     {
-        return unpack(v, true) ;
+        try {
+            return unpack(v, true) ;
+        } catch (RuntimeException ex)
+        {
+            System.err.printf("Failed to unpackDateTime: %08X\n",v) ; 
+            throw ex ;
+        }
     }
 
     public static String unpackDate(long v)
     {
-        return unpack(v, false) ;
+        try {
+            return unpack(v, false) ;
+        } catch (RuntimeException ex)
+        {
+            System.err.printf("Failed to unpackDate: %08X\n",v) ; 
+            throw ex ;
+        }
     }
 
     // Avoid calls to String.format



Mime
View raw message