[mapguide-commits] r4487 - sandbox/adsk/2.2gp/Server/src/UnitTesting
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Jan 7 12:37:05 EST 2010
Author: brucedechant
Date: 2010-01-07 12:37:04 -0500 (Thu, 07 Jan 2010)
New Revision: 4487
Modified:
sandbox/adsk/2.2gp/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: sandbox/adsk/2.2gp/Server/src/UnitTesting/TestCoordinateSystem.cpp
===================================================================
--- sandbox/adsk/2.2gp/Server/src/UnitTesting/TestCoordinateSystem.cpp 2010-01-07 06:18:50 UTC (rev 4486)
+++ sandbox/adsk/2.2gp/Server/src/UnitTesting/TestCoordinateSystem.cpp 2010-01-07 17:37:04 UTC (rev 4487)
@@ -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