[mapguide-commits] r6738 - in branches/2.4/MgDev: Common/Foundation/Data Common/MapGuideCommon/Resources Server/src/Services/Feature
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Jun 8 16:17:18 PDT 2012
Author: jng
Date: 2012-06-08 16:17:18 -0700 (Fri, 08 Jun 2012)
New Revision: 6738
Modified:
branches/2.4/MgDev/Common/Foundation/Data/NamedCollection.cpp
branches/2.4/MgDev/Common/MapGuideCommon/Resources/mapguide_en.res
branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
Log:
More error message quality improvement. Indicate the conflicting name that causes MgDuplicateObjectException
Modified: branches/2.4/MgDev/Common/Foundation/Data/NamedCollection.cpp
===================================================================
--- branches/2.4/MgDev/Common/Foundation/Data/NamedCollection.cpp 2012-06-08 09:04:29 UTC (rev 6737)
+++ branches/2.4/MgDev/Common/Foundation/Data/NamedCollection.cpp 2012-06-08 23:17:18 UTC (rev 6738)
@@ -494,7 +494,11 @@
foundItem2 = GetItem(index);
if ((foundItem1 != NULL) && (foundItem1.p != foundItem2.p))
- throw new MgDuplicateObjectException(L"CheckDuplicate", __LINE__, __WFILE__, NULL, L"", NULL); // EXC::Create(Exception::NLSGetMessage(NLSID(45_ITEMINCOLLECTION),(String*) item->GetName()));
+ {
+ MgStringCollection args;
+ args.Add(item->GetName());
+ throw new MgDuplicateObjectException(L"CheckDuplicate", __LINE__, __WFILE__, NULL, L"MgDuplicateObject", &args); // EXC::Create(Exception::NLSGetMessage(NLSID(45_ITEMINCOLLECTION),(String*) item->GetName()));
+ }
}
}
Modified: branches/2.4/MgDev/Common/MapGuideCommon/Resources/mapguide_en.res
===================================================================
--- branches/2.4/MgDev/Common/MapGuideCommon/Resources/mapguide_en.res 2012-06-08 09:04:29 UTC (rev 6737)
+++ branches/2.4/MgDev/Common/MapGuideCommon/Resources/mapguide_en.res 2012-06-08 23:17:18 UTC (rev 6738)
@@ -225,6 +225,7 @@
MgCoordinateSystemUnknownUnit = Unknown unit.
MgDataReaderIdNotFound = The data reader ID was not found.
MgDocumentIdentifierFilenameFailed = Failed to get the filename from the document identifier because no matching document path found.
+MgDuplicateObject = Duplicate object found for name: %1
MgFailedToGetFileNameForDates = Failed to get the filename for the specified dates.
MgFailedToLoadFdoLibrary = Failed to load FDO library.
MgFailedToRetrieveSystemExceptionMesage = Failed to retrieve the system exception mesage. This message may not be unicode compliant.
Modified: branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
===================================================================
--- branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp 2012-06-08 09:04:29 UTC (rev 6737)
+++ branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp 2012-06-08 23:17:18 UTC (rev 6738)
@@ -2286,7 +2286,9 @@
FdoPtr<FdoFeatureSchema> fdoSchema = GetFdoFeatureSchema(mgSchema);
if (fdoSchemaCol->Contains(fdoSchema))
{
- throw new MgDuplicateObjectException(L"MgServerFeatureUtil.GetFdoFeatureSchemaCollection", __LINE__, __WFILE__, NULL, L"", NULL);
+ MgStringCollection args;
+ args.Add(mgSchema->GetName());
+ throw new MgDuplicateObjectException(L"MgServerFeatureUtil.GetFdoFeatureSchemaCollection", __LINE__, __WFILE__, NULL, L"MgDuplicateObject", &args);
}
else
{
More information about the mapguide-commits
mailing list