incubator-vxquery-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject svn commit: r1383673 - in /incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast: CastToDateOperation.java CastToDateTimeOperation.java CastToTimeOperation.java
Date Tue, 11 Sep 2012 23:45:38 GMT
Author: prestonc
Date: Tue Sep 11 23:45:38 2012
New Revision: 1383673

URL: http://svn.apache.org/viewvc?rev=1383673&view=rev
Log:
Changed the returned error on bad input.

Modified:
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateOperation.java
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateTimeOperation.java
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTimeOperation.java

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateOperation.java?rev=1383673&r1=1383672&r2=1383673&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateOperation.java
(original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateOperation.java
Tue Sep 11 23:45:38 2012
@@ -83,7 +83,7 @@ public class CastToDateOperation extends
         }
         // Double check for a valid date
         if (!DateTime.valid(date[0], date[1], date[2], 0, 0, 0, date[3], date[4])) {
-            throw new SystemException(ErrorCode.FODT0001);
+            throw new SystemException(ErrorCode.FORG0001);
         }
 
         dOut.write(ValueTag.XS_DATE_TAG);

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateTimeOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateTimeOperation.java?rev=1383673&r1=1383672&r2=1383673&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateTimeOperation.java
(original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToDateTimeOperation.java
Tue Sep 11 23:45:38 2012
@@ -99,10 +99,10 @@ public class CastToDateTimeOperation ext
         if (date[3] == 24) {
             date[3] = 0;
         }
-        
+
         // Double check for a valid datetime
         if (!DateTime.valid(date[0], date[1], date[2], date[3], date[4], date[5], date[6],
date[7])) {
-            throw new SystemException(ErrorCode.FODT0001);
+            throw new SystemException(ErrorCode.FORG0001);
         }
 
         dOut.write(ValueTag.XS_DATETIME_TAG);

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTimeOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTimeOperation.java?rev=1383673&r1=1383672&r2=1383673&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTimeOperation.java
(original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTimeOperation.java
Tue Sep 11 23:45:38 2012
@@ -82,10 +82,10 @@ public class CastToTimeOperation extends
         if (date[0] == 24) {
             date[0] = 0;
         }
-        
+
         // Double check for a valid time
         if (!DateTime.valid(1972, 12, 31, date[0], date[1], date[2], date[3], date[4])) {
-            throw new SystemException(ErrorCode.FODT0001);
+            throw new SystemException(ErrorCode.FORG0001);
         }
 
         dOut.write(ValueTag.XS_TIME_TAG);



Mime
View raw message