[fdo-commits] r663 - branches/3.2.x/Providers/GenericRdbms/Src/Fdo/Lock

svn_fdo at osgeo.org svn_fdo at osgeo.org
Mon Jan 22 15:57:56 EST 2007


Author: thomasknoell
Date: 2007-01-22 15:57:56 -0500 (Mon, 22 Jan 2007)
New Revision: 663

Modified:
   branches/3.2.x/Providers/GenericRdbms/Src/Fdo/Lock/LockUtility.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/Fdo/Lock/LockUtility.h
Log:
Modifications to the code to reflect the changed exception messages.

Modified: branches/3.2.x/Providers/GenericRdbms/Src/Fdo/Lock/LockUtility.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/Fdo/Lock/LockUtility.cpp	2007-01-22 20:56:40 UTC (rev 662)
+++ branches/3.2.x/Providers/GenericRdbms/Src/Fdo/Lock/LockUtility.cpp	2007-01-22 20:57:56 UTC (rev 663)
@@ -1,5 +1,5 @@
 /***************************************************************************
- * Copyright (C) 2004-2006  Autodesk, Inc.
+ * Copyright (C) 2004-2007  Autodesk, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of version 2.1 of the GNU Lesser
@@ -2511,6 +2511,11 @@
       case LOCK_OWNER_RETRIEVAL_FAILURE:
         return NlsMsgGet(FDORDBMS_89, "Failed to retrieve lock owner");
         break;
+	
+	  case LOCK_SUPPORT_DATASTORE_ERROR:
+		return NlsMsgGet(FDORDBMS_452,
+				         "Locking is not supported for this datastore");
+		break;
 
       case LOCK_TYPE_RETRIEVAL_FAILURE:
         return NlsMsgGet(FDORDBMS_90, "Failed to retrieve lock type");
@@ -2545,11 +2550,6 @@
                          "Long transaction description too long (max: 255)");
         break;
 
-      case LT_NAME_LENGTH_ERROR:
-        return NlsMsgGet(FDORDBMS_358,
-                         "Long transaction name too long (max: 30)");
-        break;
-
       case LT_NAME_NULL_ERROR:
         return NlsMsgGet(FDORDBMS_359, "Long transaction name cannot be null");
         break;
@@ -2634,42 +2634,39 @@
 
     switch (exception_id) {
 
-      case ACTIVE_LT_ERROR:
-        return NlsMsgGet1(FDORDBMS_366,
-                          "%1$ls: Cannot process active long transaction",
-                          parameter_1);
-        break;
-
       case INVALID_CONTEXT:
-        return NlsMsgGet1(FDORDBMS_353,
-                          "Invalid context for command '%1$ls'",
-                          parameter_1);
+        return NlsMsgGet1(
+                FDORDBMS_353,
+                "Invalid context for command '%1$ls'",
+                parameter_1);
         break;
 
       case LT_NAME_NOT_UNIQUE:
         return NlsMsgGet1(
-                      FDORDBMS_362,
-                      "Long transaction name '%1$ls' not unique; cannot create",
-                      parameter_1);
+                FDORDBMS_362,
+                "Long transaction name '%1$ls' not unique; cannot create",
+                parameter_1);
         break;
 
       case LT_CONFLICT_LOAD_ERROR:
         return NlsMsgGet1(
-                      FDORDBMS_402,
-                      "%1$ls: Failed to load version conflicts",
-                      parameter_1);
+                FDORDBMS_402,
+                "%1$ls: Failed to load version conflicts",
+                parameter_1);
         break;
 
       case READER_POSITIONING_ERROR:
-        return NlsMsgGet1(FDORDBMS_383,
-                          "Reader '%1$ls' is not positioned correctly",
-                          parameter_1);
+        return NlsMsgGet1(
+                FDORDBMS_383,
+                "Reader '%1$ls' is not positioned correctly",
+                parameter_1);
         break;
 
       case ROOT_LT_ERROR:
-        return NlsMsgGet1(FDORDBMS_367,
-                          "%1$ls: Cannot process root long transaction",
-                          parameter_1);
+        return NlsMsgGet1(
+                FDORDBMS_367,
+                "%1$ls: Cannot process root long transaction",
+                parameter_1);
         break;
 
       case UNSUPPORTED_ORACLE_VERSION:
@@ -2703,7 +2700,7 @@
       case INVALID_LT_NAME:
         return NlsMsgGet2(
                 FDORDBMS_363,
-                "Invalid long transaction name ('%1$ls') for command '%2$ls'",
+                "%1$ls: Invalid long transaction name ('%2$ls')",
                 parameter_1,
                 parameter_2);
         break;
@@ -2715,18 +2712,13 @@
                 parameter_2,
                 parameter_1);
         break;
-	
-	  case LOCK_SUPPORT_DATASTORE_ERROR:
-		return NlsMsgGet(
-				FDORDBMS_452,
-				"Locking is not supported for this datastore");
-		break;
 
       case LOCK_TYPE_INPUT_ERROR:
-        return NlsMsgGet2(FDORDBMS_239,
-                          "Invalid lock type '%1$ls' for command '%2$ls'",
-                          parameter_1,
-                          parameter_2);
+        return NlsMsgGet2(
+                FDORDBMS_239,
+                "Invalid lock type '%1$ls' for command '%2$ls'",
+                parameter_1,
+                parameter_2);
         break;
 
       case LT_ACTIVE_SESSION_ERROR:
@@ -2737,11 +2729,20 @@
                 parameter_2);
         break;
 
+      case LT_CONFLICT_ENV_ERROR:
+        return NlsMsgGet2(
+                FDORDBMS_403,
+                "%1$ls: Version conflicts caused by Oracle data from the following Oracle users outside current data store: %2$ls",
+                parameter_1,
+                parameter_2);
+        break;
+
       case LT_DOES_NOT_EXIST:
-        return NlsMsgGet2(FDORDBMS_361,
-                          "%1$ls: Long transaction '%2$ls' does not exist",
-                          parameter_1,
-                          parameter_2);
+        return NlsMsgGet2(
+                FDORDBMS_361,
+                "%1$ls: Long transaction '%2$ls' does not exist",
+                parameter_1,
+                parameter_2);
         break;
 
       case LT_LEAF_ERROR:
@@ -2752,22 +2753,22 @@
                 parameter_2);
         break;
 
-      case LT_CONFLICT_ENV_ERROR:
-        return NlsMsgGet2(FDORDBMS_403,
-                          "%1$ls: Version conflicts caused by Oracle data from the following Oracle users outside current data store: %2$ls",
-                          parameter_1,
-                          parameter_2);
+      case LT_NAME_LENGTH_ERROR:
+        return NlsMsgGet2(
+                FDORDBMS_358,
+                "%1$ls: Long transaction name ('%2$ls') too long (0 < name <= 30)",
+                parameter_1,
+                parameter_2);
         break;
 
       case UNSUPPORTED_LOCK_TYPE:
-        return NlsMsgGet2(FDORDBMS_355,
-                          "Unsupported lock type '%1$ls' for command '%2$ls'",
-                          parameter_1,
-                          parameter_2);
+        return NlsMsgGet2(
+                FDORDBMS_355,
+                "Unsupported lock type '%1$ls' for command '%2$ls'",
+                parameter_1,
+                parameter_2);
         break;
 
-	  
-
       default:
         return NlsMsgGet(FDORDBMS_100, "Unknown error code");
         break;

Modified: branches/3.2.x/Providers/GenericRdbms/Src/Fdo/Lock/LockUtility.h
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/Fdo/Lock/LockUtility.h	2007-01-22 20:56:40 UTC (rev 662)
+++ branches/3.2.x/Providers/GenericRdbms/Src/Fdo/Lock/LockUtility.h	2007-01-22 20:57:56 UTC (rev 663)
@@ -1,5 +1,5 @@
 /***************************************************************************
- * Copyright (C) 2004-2006  Autodesk, Inc.
+ * Copyright (C) 2004-2007  Autodesk, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of version 2.1 of the GNU Lesser
@@ -103,8 +103,7 @@
                            LT_IN_CURR_COLUMN,
                            ROW_LOCK_TYPE_COLUMN};
 
-    enum ExceptionIds     {ACTIVE_LT_ERROR,
-                           ADMINISTRATOR_ROLE_REQUIRED,
+    enum ExceptionIds     {ADMINISTRATOR_ROLE_REQUIRED,
                            CLASS_NAME_RETRIEVAL_FAILURE,
                            CLEAR_LOCK_REPORT_FAILURE,
                            CLOSING_LOCK_CONFLICT_READER_FAILURE,



More information about the fdo-commits mailing list