[mapguide-commits] r4363 - trunk/MgDev/Common/PlatformBase/Services
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Dec 2 04:59:39 EST 2009
Author: leaf
Date: 2009-12-02 04:59:39 -0500 (Wed, 02 Dec 2009)
New Revision: 4363
Modified:
trunk/MgDev/Common/PlatformBase/Services/FeatureReader.cpp
Log:
Submitted this change on behalf of Klain Qin
Ticket #1169 (MgFeatureReader should throw an exception if a property name is not found)
Modified: trunk/MgDev/Common/PlatformBase/Services/FeatureReader.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/FeatureReader.cpp 2009-11-30 23:09:34 UTC (rev 4362)
+++ trunk/MgDev/Common/PlatformBase/Services/FeatureReader.cpp 2009-12-02 09:59:39 UTC (rev 4363)
@@ -68,7 +68,16 @@
Ptr<MgPropertyDefinitionCollection> propDefCol = classDef->GetProperties();
CHECKNULL((MgPropertyDefinitionCollection*)propDefCol, L"MgFeatureReader.GetPropertyIndex");
- return propDefCol->IndexOf(propertyName);
+ INT32 index = propDefCol->IndexOf(propertyName);
+ if (-1 != index)
+ {
+ return index;
+ }
+ else
+ {
+ throw new MgObjectNotFoundException(L"MgFeatureReader.GetPropertyIndex", __LINE__, __WFILE__, NULL, L"", NULL);
+ return -1; // to suppress compiler warning.
+ }
}
//////////////////////////////////////////////////////////////////
More information about the mapguide-commits
mailing list