[mapguide-commits] r4494 - trunk/MgDev/Server/src/UnitTesting
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Jan 7 18:46:12 EST 2010
Author: brucedechant
Date: 2010-01-07 18:46:12 -0500 (Thu, 07 Jan 2010)
New Revision: 4494
Modified:
trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.cpp
Log:
Added a try/catch block around the processing of coordinate system categories. The "Denmark" and "Obsolete Coordinate Systems" categories would fail and prevent any of the other categories from being tested.
Modified: trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.cpp 2010-01-07 23:35:33 UTC (rev 4493)
+++ trunk/MgDev/Server/src/UnitTesting/TestCoordinateSystem.cpp 2010-01-07 23:46:12 UTC (rev 4494)
@@ -333,14 +333,23 @@
Ptr<MgBatchPropertyCollection> coordSystems;
STRING category = categories->GetItem(i);
ACE_DEBUG((LM_INFO, ACE_TEXT(" Checking %W - "), category.c_str()));
+ int nCoordinateSystems = 0;
- coordSystems = factory.EnumerateCoordinateSystems(category);
+ try
+ {
+ coordSystems = factory.EnumerateCoordinateSystems(category);
- // Get the # of coordinate systems for this category
- int nCoordinateSystems = coordSystems->GetCount();
+ // Get the # of coordinate systems for this category
+ nCoordinateSystems = coordSystems->GetCount();
- nTotalCoordinateSystemsTested += nCoordinateSystems;
- ACE_DEBUG((LM_INFO, ACE_TEXT("%d (Coordinate Systems)\n"), nCoordinateSystems));
+ nTotalCoordinateSystemsTested += nCoordinateSystems;
+ ACE_DEBUG((LM_INFO, ACE_TEXT("%d (Coordinate Systems)\n"), nCoordinateSystems));
+ }
+ catch(MgException* e)
+ {
+ SAFE_RELEASE(e);
+ ACE_DEBUG((LM_INFO, ACE_TEXT("Skipped\n")));
+ }
for(int j=0;j<nCoordinateSystems;j++)
{
More information about the mapguide-commits
mailing list