[mapguide-commits] r7659 - in trunk/MgDev/Oem/SQLite/src: SqliteDotNet SqliteVM

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Jul 4 08:08:56 PDT 2013


Author: jng
Date: 2013-07-04 08:08:56 -0700 (Thu, 04 Jul 2013)
New Revision: 7659

Modified:
   trunk/MgDev/Oem/SQLite/src/SqliteDotNet/SqliteDotNet.cpp
   trunk/MgDev/Oem/SQLite/src/SqliteVM/SqliteDB.cpp
Log:
#2307: SqliteDB in SqliteDotNet does not wrap the CantCloseDbException that can be thrown by its unmanaged counterpart. We don't need this unmanaged exception derailing our test runner for a situations where it doesn't really matter. If we can close, great. If we can't, we're finishing up anyways.

Modified: trunk/MgDev/Oem/SQLite/src/SqliteDotNet/SqliteDotNet.cpp
===================================================================
--- trunk/MgDev/Oem/SQLite/src/SqliteDotNet/SqliteDotNet.cpp	2013-07-04 12:20:23 UTC (rev 7658)
+++ trunk/MgDev/Oem/SQLite/src/SqliteDotNet/SqliteDotNet.cpp	2013-07-04 15:08:56 UTC (rev 7659)
@@ -58,7 +58,15 @@
     int err = SQLITE_ERROR;
     if (database != NULL)
     {
-        err = database->CloseDB();
+        try 
+        {
+            err = database->CloseDB();
+        }
+        catch (CantCloseDbException* ex)
+        {
+            SAFE_RELEASE(ex);
+        }
+
         delete database;
         database = NULL;
     }

Modified: trunk/MgDev/Oem/SQLite/src/SqliteVM/SqliteDB.cpp
===================================================================
--- trunk/MgDev/Oem/SQLite/src/SqliteVM/SqliteDB.cpp	2013-07-04 12:20:23 UTC (rev 7658)
+++ trunk/MgDev/Oem/SQLite/src/SqliteVM/SqliteDB.cpp	2013-07-04 15:08:56 UTC (rev 7659)
@@ -42,7 +42,14 @@
 //Destructor. Closes the connection and deallocates the space for db_name
 SqliteDB::~SqliteDB()
 {
-    CloseDB();
+    try
+    {
+        CloseDB();
+    }
+    catch (CantCloseDbException* ex)
+    {
+        SAFE_RELEASE(ex);
+    }
 }
 
 void SqliteDB::Dispose()



More information about the mapguide-commits mailing list