From: <tho...@us...> - 2010-08-02 23:19:13
|
Revision: 3396 http://bigdata.svn.sourceforge.net/bigdata/?rev=3396&view=rev Author: thompsonbry Date: 2010-08-02 23:19:07 +0000 (Mon, 02 Aug 2010) Log Message: ----------- Added more detailed error messages to the numberic comparison method. Modified Paths: -------------- trunk/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java Modified: trunk/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java =================================================================== --- trunk/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java 2010-08-02 23:16:12 UTC (rev 3395) +++ trunk/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java 2010-08-02 23:19:07 UTC (rev 3396) @@ -91,12 +91,28 @@ */ public static int numericalCompare(IV iv1, IV iv2) { - if (!iv1.isInline() || !iv2.isInline()) - throw new IllegalArgumentException("not inline terms"); + if (!iv1.isInline()) + throw new IllegalArgumentException("left term is not inline: left=" + + iv1 + ", right=" + iv2); + + if (!iv2.isInline()) + throw new IllegalArgumentException( + "right term is not inline: left=" + iv1 + ", right=" + iv2); - if (!iv1.isLiteral() || !iv2.isLiteral()) - throw new IllegalArgumentException("not literals"); +// if (!iv1.isInline() || !iv2.isInline()) +// throw new IllegalArgumentException("not inline terms"); + if (!iv1.isLiteral()) + throw new IllegalArgumentException( + "left term is not literal: left=" + iv1 + ", right=" + iv2); + + if (!iv2.isLiteral()) + throw new IllegalArgumentException( + "right term is not literal: left=" + iv1 + ", right=" + iv2); + +// if (!iv1.isLiteral() || !iv2.isLiteral()) +// throw new IllegalArgumentException("not literals"); + final DTE dte1 = iv1.getDTE(); final DTE dte2 = iv2.getDTE(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |