[mapguide-commits] r8517 - in trunk/MgDev: Common/Foundation/System Common/Geometry Common/Geometry/Spatial Common/MapGuideCommon/MapLayer Common/MapGuideCommon/Services Common/PlatformBase/MapLayer Common/PlatformBase/Services Server/src/Common/Manager Server/src/Services/Feature Server/src/Services/Mapping Server/src/Services/Resource Server/src/UnitTesting

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Jan 26 03:54:48 PST 2015


Author: jng
Date: 2015-01-26 03:54:48 -0800 (Mon, 26 Jan 2015)
New Revision: 8517

Modified:
   trunk/MgDev/Common/Foundation/System/XmlUtil.cpp
   trunk/MgDev/Common/Geometry/GeosUtil.cpp
   trunk/MgDev/Common/Geometry/Spatial/SpatialUtility.cpp
   trunk/MgDev/Common/Geometry/Spatial/SpatialUtilityCircularArc.cpp
   trunk/MgDev/Common/MapGuideCommon/MapLayer/Selection.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/PrintLayout.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyDataReader.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureTransaction.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ServerConnection.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/Site.cpp
   trunk/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp
   trunk/MgDev/Common/PlatformBase/Services/FeatureReader.cpp
   trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp
   trunk/MgDev/Server/src/Services/Feature/FeatureGeometricFunctions.cpp
   trunk/MgDev/Server/src/Services/Feature/FeatureManipulationCommand.cpp
   trunk/MgDev/Server/src/Services/Feature/FeatureNumericFunctions.cpp
   trunk/MgDev/Server/src/Services/Feature/FeatureServiceCommand.cpp
   trunk/MgDev/Server/src/Services/Feature/FeatureStringFunctions.cpp
   trunk/MgDev/Server/src/Services/Feature/JoinFeatureReader.cpp
   trunk/MgDev/Server/src/Services/Feature/SelectAggregateCommand.cpp
   trunk/MgDev/Server/src/Services/Feature/SelectCommand.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerDeleteCommand.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerGetFeatureProviders.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerGwsFeatureReader.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerInsertCommand.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp
   trunk/MgDev/Server/src/Services/Feature/ServerUpdateCommand.cpp
   trunk/MgDev/Server/src/Services/Feature/TransformedGeometryFeatureReader.cpp
   trunk/MgDev/Server/src/Services/Mapping/ServerMappingService.cpp
   trunk/MgDev/Server/src/Services/Resource/SiteResourceContentManager.cpp
   trunk/MgDev/Server/src/UnitTesting/TestSiteService.cpp
Log:
#2524: Update places in codebase where CHECKARGUMENTNULL should be used instead of CHECKNULL, as were supposed to be checking for null arguments in such places and not null references.

Modified: trunk/MgDev/Common/Foundation/System/XmlUtil.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/System/XmlUtil.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/Foundation/System/XmlUtil.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -74,7 +74,7 @@
     m_doc(NULL),
     m_ownDomDoc(true)
 {
-    CHECKNULL(rootElementName, L"MgXmlUtil.MgXmlUtil");
+    CHECKARGUMENTNULL(rootElementName, L"MgXmlUtil.MgXmlUtil");
 
     DOMImplementation* impl =
         DOMImplementationRegistry::getDOMImplementation(X("Core"));
@@ -106,7 +106,7 @@
 
 void MgXmlUtil::ParseString(const char* xmlContent)
 {
-    CHECKNULL(xmlContent, L"MgXmlUtil.MgXmlUtil");
+    CHECKARGUMENTNULL(xmlContent, L"MgXmlUtil.MgXmlUtil");
     assert(NULL == m_parser && NULL == m_bis);
     assert(NULL == m_doc && !m_ownDomDoc);
 
@@ -129,8 +129,8 @@
 DOMElement* MgXmlUtil::AddChildNode(DOMElement* parentNode, const char* elementName)
 {
     CHECKNULL(m_doc,       L"MgXmlUtil.AddChildNode");
-    CHECKNULL(parentNode,  L"MgXmlUtil.AddChildNode");
-    CHECKNULL(elementName, L"MgXmlUtil.AddChildNode");
+    CHECKARGUMENTNULL(parentNode,  L"MgXmlUtil.AddChildNode");
+    CHECKARGUMENTNULL(elementName, L"MgXmlUtil.AddChildNode");
 
     // Add Feature Provider element
     DOMElement* childNode = m_doc->createElement(X(elementName));
@@ -152,8 +152,8 @@
 void MgXmlUtil::AddTextNode(DOMElement* parentNode, const char* elementName, const char* elementText)
 {
     CHECKNULL(m_doc,       L"MgXmlUtil.AddTextNode");
-    CHECKNULL(parentNode,  L"MgXmlUtil.AddTextNode");
-    CHECKNULL(elementName, L"MgXmlUtil.AddTextNode");
+    CHECKARGUMENTNULL(parentNode, L"MgXmlUtil.AddTextNode");
+    CHECKARGUMENTNULL(elementName, L"MgXmlUtil.AddTextNode");
 
     if (NULL != elementText)
     {
@@ -170,9 +170,9 @@
 void MgXmlUtil::AddTextNode(DOMElement* parentNode, const char* elementName, const wchar_t* elementText)
 {
     CHECKNULL(m_doc,       L"MgXmlUtil.AddTextNode");
-    CHECKNULL(parentNode,  L"MgXmlUtil.AddTextNode");
-    CHECKNULL(elementName, L"MgXmlUtil.AddTextNode");
-    CHECKNULL(elementText, L"MgXmlUtil.AddTextNode");
+    CHECKARGUMENTNULL(parentNode, L"MgXmlUtil.AddTextNode");
+    CHECKARGUMENTNULL(elementName, L"MgXmlUtil.AddTextNode");
+    CHECKARGUMENTNULL(elementText, L"MgXmlUtil.AddTextNode");
 
     DOMElement* elemName = m_doc->createElement(X(elementName));
     if (NULL != elemName)
@@ -191,8 +191,8 @@
 void MgXmlUtil::UpdateTextNode(DOMNode* parentNode, const char* elementText)
 {
     CHECKNULL(m_doc,       L"MgXmlUtil.UpdateTextNode");
-    CHECKNULL(parentNode,  L"MgXmlUtil.UpdateTextNode");
-    CHECKNULL(elementText, L"MgXmlUtil.UpdateTextNode");
+    CHECKARGUMENTNULL(parentNode, L"MgXmlUtil.UpdateTextNode");
+    CHECKARGUMENTNULL(elementText, L"MgXmlUtil.UpdateTextNode");
 
     DOMNode* child = parentNode->getFirstChild();
 
@@ -216,8 +216,8 @@
 void MgXmlUtil::UpdateTextNode(DOMNode* parentNode, const wchar_t* elementText)
 {
     CHECKNULL(m_doc,       L"MgXmlUtil.UpdateTextNode");
-    CHECKNULL(parentNode,  L"MgXmlUtil.UpdateTextNode");
-    CHECKNULL(elementText, L"MgXmlUtil.UpdateTextNode");
+    CHECKARGUMENTNULL(parentNode, L"MgXmlUtil.UpdateTextNode");
+    CHECKARGUMENTNULL(elementText, L"MgXmlUtil.UpdateTextNode");
 
     DOMNode* child = parentNode->getFirstChild();
 
@@ -241,8 +241,8 @@
 DOMNode* MgXmlUtil::GetNodeWithTextData(DOMDocument* doc, const char* elementName,
     const wchar_t* elementText)
 {
-    CHECKNULL( doc,             L"MgXmlUtil::GetNodeWithTextData" );
-    CHECKNULL( elementName,     L"MgXmlUtil::GetNodeWithTextData" );
+    CHECKARGUMENTNULL(doc, L"MgXmlUtil::GetNodeWithTextData");
+    CHECKARGUMENTNULL(elementName, L"MgXmlUtil::GetNodeWithTextData");
 
     DOMNode* ret = NULL;
 
@@ -355,7 +355,7 @@
 
 void MgXmlUtil::SetAttribute(DOMElement* node, const char* attributeName, const wchar_t* value)
 {
-    CHECKNULL(node,  L"MgXmlUtil.SetAttribute");
+    CHECKARGUMENTNULL(node, L"MgXmlUtil.SetAttribute");
 
     char* mbStr = MgUtil::WideCharToMultiByte(value);
     CHECKNULL(mbStr,  L"MgXmlUtil.SetAttribute");

Modified: trunk/MgDev/Common/Geometry/GeosUtil.cpp
===================================================================
--- trunk/MgDev/Common/Geometry/GeosUtil.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/Geometry/GeosUtil.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -941,7 +941,7 @@
 
 STRING MgGeosUtil::ToAwkt(MgGeometricEntity* geom1)
 {
-    CHECKNULL(geom1, L"MgGeosUtil::ToAwkt")
+    CHECKARGUMENTNULL(geom1, L"MgGeosUtil::ToAwkt")
 
     // Increment the refcount
     SAFE_ADDREF((MgGeometricEntity*) geom1);

Modified: trunk/MgDev/Common/Geometry/Spatial/SpatialUtility.cpp
===================================================================
--- trunk/MgDev/Common/Geometry/Spatial/SpatialUtility.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/Geometry/Spatial/SpatialUtility.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -184,7 +184,7 @@
 
 MgLinearRing* MgSpatialUtility::CurveRingToLinearRing(MgCurveRing* curveRing, double maxSpacing, double maxOffset)
 {
-    CHECKNULL(curveRing, L"MgSpatialUtility.CurveRingToLinearRing")
+    CHECKARGUMENTNULL(curveRing, L"MgSpatialUtility.CurveRingToLinearRing")
 
     MgGeometryFactory factory;
 
@@ -197,7 +197,7 @@
 
 MgLinearSegment* MgSpatialUtility::ArcSegmentToLinearSegment(MgArcSegment* segment, double maxSpacing, double maxOffset)
 {
-    CHECKNULL(segment, L"MgSpatialUtility.ArcSegmentToLinearSegment")
+    CHECKARGUMENTNULL(segment, L"MgSpatialUtility.ArcSegmentToLinearSegment")
 
     MgGeometryFactory factory;
 
@@ -481,7 +481,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 MgGeometryComponent* MgSpatialUtility::TesselateGeometryComponent(MgGeometryComponent* curve)
 {
-    CHECKNULL(curve, L"MgSpatialUtility.TesselateCurve")
+    CHECKARGUMENTNULL(curve, L"MgSpatialUtility.TesselateCurve")
 
     Ptr<MgGeometryComponent> retGeomComp;
     Ptr<MgEnvelope> env = curve->Envelope();
@@ -555,11 +555,11 @@
     double num, denom;          // numerator and denominator
     double tolerance;
 
-    CHECKNULL(result,   L"MgSpatialUtility.SegmentIntersection")
-    CHECKNULL(seg1From, L"MgSpatialUtility.SegmentIntersection")
-    CHECKNULL(seg1To,   L"MgSpatialUtility.SegmentIntersection")
-    CHECKNULL(seg2From, L"MgSpatialUtility.SegmentIntersection")
-    CHECKNULL(seg2To,   L"MgSpatialUtility.SegmentIntersection")
+    CHECKARGUMENTNULL(result, L"MgSpatialUtility.SegmentIntersection")
+    CHECKARGUMENTNULL(seg1From, L"MgSpatialUtility.SegmentIntersection")
+    CHECKARGUMENTNULL(seg1To, L"MgSpatialUtility.SegmentIntersection")
+    CHECKARGUMENTNULL(seg2From, L"MgSpatialUtility.SegmentIntersection")
+    CHECKARGUMENTNULL(seg2To, L"MgSpatialUtility.SegmentIntersection")
     if (magnitude < 1.0E-04)
     {
         throw new MgInvalidArgumentException(L"MgSpatialUtility.SegmentIntersection", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -893,9 +893,9 @@
     Ptr<MgCoordinate> polyFrom;
     Ptr<MgCoordinate> polyTo;
 
-    CHECKNULL(polyItr, L"MgSpatialUtility.PolySegIntersection")
-    CHECKNULL(segFrom, L"MgSpatialUtility.PolySegIntersection")
-    CHECKNULL(segTo,   L"MgSpatialUtility.PolySegIntersection")
+    CHECKARGUMENTNULL(polyItr, L"MgSpatialUtility.PolySegIntersection")
+    CHECKARGUMENTNULL(segFrom, L"MgSpatialUtility.PolySegIntersection")
+    CHECKARGUMENTNULL(segTo, L"MgSpatialUtility.PolySegIntersection")
 
     // We need this so we can determine a valid value to use for
     // "fuzzy" double comparisons.

Modified: trunk/MgDev/Common/Geometry/Spatial/SpatialUtilityCircularArc.cpp
===================================================================
--- trunk/MgDev/Common/Geometry/Spatial/SpatialUtilityCircularArc.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/Geometry/Spatial/SpatialUtilityCircularArc.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -31,9 +31,9 @@
 MgSpatialUtilityCircularArc::MgSpatialUtilityCircularArc(MgCoordinate* start, MgCoordinate* mid, MgCoordinate* end) :
                                                            m_isValidArc(false), m_hasZ(false), m_isCircle(false)
 {
-    CHECKNULL(start, L"MgSpatialUtilityCircularArc.MgSpatialUtilityCircularArc");
-    CHECKNULL(mid, L"MgSpatialUtilityCircularArc.MgSpatialUtilityCircularArc");
-    CHECKNULL(end, L"MgSpatialUtilityCircularArc.MgSpatialUtilityCircularArc");
+    CHECKARGUMENTNULL(start, L"MgSpatialUtilityCircularArc.MgSpatialUtilityCircularArc");
+    CHECKARGUMENTNULL(mid, L"MgSpatialUtilityCircularArc.MgSpatialUtilityCircularArc");
+    CHECKARGUMENTNULL(end, L"MgSpatialUtilityCircularArc.MgSpatialUtilityCircularArc");
 
     MgGeometryFactory factory;
 

Modified: trunk/MgDev/Common/MapGuideCommon/MapLayer/Selection.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/MapLayer/Selection.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/MapGuideCommon/MapLayer/Selection.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -60,7 +60,7 @@
 //
 MgFeatureReader* MgSelection::GetSelectedFeatures(MgLayerBase* layer, CREFSTRING className, bool mappedOnly)
 {
-    CHECKNULL((MgLayerBase*)layer, L"MgSelection.GetSelectedFeatures");
+    CHECKARGUMENTNULL((MgLayerBase*)layer, L"MgSelection.GetSelectedFeatures");
 
     if (!mappedOnly)
         return GetSelectedFeatures(layer, className, (MgStringCollection*)NULL);
@@ -97,7 +97,7 @@
 ///
 MgFeatureReader* MgSelection::GetSelectedFeatures(MgLayerBase* layer, CREFSTRING className, MgStringCollection* propertyNames)
 {
-    CHECKNULL((MgLayerBase*)layer, L"MgSelection.GetSelectedFeatures");
+    CHECKARGUMENTNULL((MgLayerBase*)layer, L"MgSelection.GetSelectedFeatures");
 
     Ptr<MgFeatureService> featureService = dynamic_cast<MgFeatureService*>(
         m_map->GetService(MgServiceType::FeatureService));

Modified: trunk/MgDev/Common/MapGuideCommon/Services/PrintLayout.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/PrintLayout.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/MapGuideCommon/Services/PrintLayout.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -189,7 +189,7 @@
 // Helper method to get the layout properties from the PrintLayout xml resource.
 void MgPrintLayout::GetLayoutPropertiesFromXml(MgXmlUtil* pXmlUtil)
 {
-    CHECKNULL(pXmlUtil, L"MgPrintLayout.GetLayoutPropertiesFromXml()");
+    CHECKARGUMENTNULL(pXmlUtil, L"MgPrintLayout.GetLayoutPropertiesFromXml()");
 
     MG_TRY()
 

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyDataReader.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyDataReader.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyDataReader.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -757,7 +757,7 @@
 
 void MgProxyDataReader::SetService(MgFeatureService* service)
 {
-    CHECKNULL(service, L"MgProxyDataReader.SetService");
+    CHECKARGUMENTNULL(service, L"MgProxyDataReader.SetService");
 
     if (m_service == NULL)
     {
@@ -865,7 +865,7 @@
 void MgProxyDataReader::UpdateCurrentSet(MgBatchPropertyCollection* bpCol)
 {
     CHECKNULL((MgBatchPropertyCollection*)m_set, L"MgProxyDataReader.UpdateCurrentSet");
-    CHECKNULL((MgBatchPropertyCollection*)bpCol, L"MgProxyDataReader.UpdateCurrentSet");
+    CHECKARGUMENTNULL((MgBatchPropertyCollection*)bpCol, L"MgProxyDataReader.UpdateCurrentSet");
 
     m_set->Clear();
 

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -908,7 +908,7 @@
 
 void MgProxyFeatureReader::SetService(MgFeatureService* service)
 {
-    CHECKNULL(service, L"MgProxyFeatureReader.SetService");
+    CHECKARGUMENTNULL(service, L"MgProxyFeatureReader.SetService");
 
     if (m_service == NULL)
     {

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureTransaction.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureTransaction.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureTransaction.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -73,7 +73,7 @@
 STRING MgProxyFeatureTransaction::AddSavePoint(CREFSTRING suggestName)
 {
     CHECKNULL(m_service, L"MgProxyFeatureTransaction.AddSavePoint");
-	return m_service->AddSavePoint(m_transactionId, suggestName);
+    return m_service->AddSavePoint(m_transactionId, suggestName);
 }
 
 void MgProxyFeatureTransaction::ReleaseSavePoint(CREFSTRING savePointName)
@@ -136,7 +136,7 @@
 
 void MgProxyFeatureTransaction::SetService(MgFeatureService* service)
 {
-    CHECKNULL(service, L"MgProxyFeatureTransaction.SetService");
+    CHECKARGUMENTNULL(service, L"MgProxyFeatureTransaction.SetService");
 
     if (m_service == NULL)
     {

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -843,7 +843,7 @@
 
 void MgProxyGwsFeatureReader::SetService(MgFeatureService* service)
 {
-    CHECKNULL(service, L"MgProxyGwsFeatureReader.SetService");
+    CHECKARGUMENTNULL(service, L"MgProxyGwsFeatureReader.SetService");
 
     if (m_service == NULL)
     {

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -753,7 +753,7 @@
 
 void MgProxySqlDataReader::SetService(MgFeatureService* service)
 {
-    CHECKNULL(service, L"MgProxySqlDataReader.SetService");
+    CHECKARGUMENTNULL(service, L"MgProxySqlDataReader.SetService");
 
     if (m_service == NULL)
     {
@@ -861,7 +861,7 @@
 void MgProxySqlDataReader::UpdateCurrentSet(MgBatchPropertyCollection* bpCol)
 {
     CHECKNULL((MgBatchPropertyCollection*)m_set, L"MgProxySqlDataReader.UpdateCurrentSet");
-    CHECKNULL((MgBatchPropertyCollection*)bpCol, L"MgProxySqlDataReader.UpdateCurrentSet");
+    CHECKARGUMENTNULL((MgBatchPropertyCollection*)bpCol, L"MgProxySqlDataReader.UpdateCurrentSet");
 
     m_set->Clear();
 

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ServerConnection.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ServerConnection.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ServerConnection.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -286,8 +286,8 @@
 MgServerConnection* MgServerConnection::Acquire(MgUserInformation* userInformation,
                                                 MgConnectionProperties* connProp)
 {
-    CHECKNULL(userInformation, L"MgServerConnection.Acquire");
-    CHECKNULL((MgConnectionProperties*)connProp, L"MgServerConnection.Acquire");
+    CHECKARGUMENTNULL(userInformation, L"MgServerConnection.Acquire");
+    CHECKARGUMENTNULL((MgConnectionProperties*)connProp, L"MgServerConnection.Acquire");
 
     MgServerConnectionPool* connectionPool = MgServerConnectionPool::GetInstance();
     CHECKNULL(connectionPool, L"MgServerConnection.Acquire");
@@ -358,7 +358,7 @@
 /// TargetNotFound
 void MgServerConnection::Remove(MgConnectionProperties* connProp)
 {
-    CHECKNULL((MgConnectionProperties*)connProp, L"MgServerConnection.Remove");
+    CHECKARGUMENTNULL((MgConnectionProperties*)connProp, L"MgServerConnection.Remove");
 
     {
         ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex));

Modified: trunk/MgDev/Common/MapGuideCommon/Services/Site.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/Site.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/MapGuideCommon/Services/Site.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -604,8 +604,8 @@
 /// MgRoleNotFoundException
 void MgSite::GrantRoleMembershipsToUsers(MgStringCollection* roles, MgStringCollection* users)
 {
-    CHECKNULL      ( (MgStringCollection*) roles, L"MgSite::GrantRoleMembershipsToUsers" )
-    CHECKNULL      ( (MgStringCollection*) users, L"MgSite::GrantRoleMembershipsToUsers" )
+    CHECKARGUMENTNULL((MgStringCollection*)roles, L"MgSite::GrantRoleMembershipsToUsers")
+    CHECKARGUMENTNULL((MgStringCollection*)users, L"MgSite::GrantRoleMembershipsToUsers")
 
     MgCommand cmd;
 
@@ -647,8 +647,8 @@
 /// MgRoleNotFoundException
 void MgSite::RevokeRoleMembershipsFromUsers(MgStringCollection* roles, MgStringCollection* users)
 {
-    CHECKNULL      ( (MgStringCollection*) roles, L"MgSite::RevokeRoleMembershipsFromUsers" )
-    CHECKNULL      ( (MgStringCollection*) users, L"MgSite::RevokeRoleMembershipsFromUsers" )
+    CHECKARGUMENTNULL((MgStringCollection*)roles, L"MgSite::RevokeRoleMembershipsFromUsers")
+    CHECKARGUMENTNULL((MgStringCollection*)users, L"MgSite::RevokeRoleMembershipsFromUsers")
 
     MgCommand cmd;
 
@@ -690,8 +690,8 @@
 /// MgGroupNotFoundException
 void MgSite::GrantGroupMembershipsToUsers(MgStringCollection* groups, MgStringCollection* users)
 {
-    CHECKNULL      ( (MgStringCollection*) groups, L"MgSite::GrantGroupMembershipsToUsers" )
-    CHECKNULL      ( (MgStringCollection*) users,  L"MgSite::GrantGroupMembershipsToUsers" )
+    CHECKARGUMENTNULL((MgStringCollection*)groups, L"MgSite::GrantGroupMembershipsToUsers")
+    CHECKARGUMENTNULL((MgStringCollection*)users, L"MgSite::GrantGroupMembershipsToUsers")
 
     MgCommand cmd;
 
@@ -733,8 +733,8 @@
 /// MgGroupNotFoundException
 void MgSite::RevokeGroupMembershipsFromUsers(MgStringCollection* groups, MgStringCollection* users)
 {
-    CHECKNULL      ( (MgStringCollection*) groups, L"MgSite::RevokeGroupMembershipsFromUsers" )
-    CHECKNULL      ( (MgStringCollection*) users,  L"MgSite::RevokeGroupMembershipsFromUsers" )
+    CHECKARGUMENTNULL((MgStringCollection*)groups, L"MgSite::RevokeGroupMembershipsFromUsers")
+    CHECKARGUMENTNULL((MgStringCollection*)users, L"MgSite::RevokeGroupMembershipsFromUsers")
 
     MgCommand cmd;
 
@@ -950,7 +950,7 @@
 /// MgGroupNotFoundException
 void MgSite::DeleteGroups( MgStringCollection* groups )
 {
-    CHECKNULL      ( (MgStringCollection*) groups,  L"MgSite::DeleteGroups" )
+    CHECKARGUMENTNULL((MgStringCollection*)groups, L"MgSite::DeleteGroups")
 
     MgCommand cmd;
 
@@ -991,8 +991,8 @@
 /// MgRoleNotFoundException
 void MgSite::GrantRoleMembershipsToGroups(MgStringCollection* roles, MgStringCollection* groups)
 {
-    CHECKNULL      ( (MgStringCollection*) roles,  L"MgSite::GrantRoleMembershipsToGroups" )
-    CHECKNULL      ( (MgStringCollection*) groups, L"MgSite::GrantRoleMembershipsToGroups" )
+    CHECKARGUMENTNULL((MgStringCollection*)roles, L"MgSite::GrantRoleMembershipsToGroups")
+    CHECKARGUMENTNULL((MgStringCollection*)groups, L"MgSite::GrantRoleMembershipsToGroups")
 
     MgCommand cmd;
 
@@ -1034,8 +1034,8 @@
 /// MgRoleNotFoundException
 void MgSite::RevokeRoleMembershipsFromGroups(MgStringCollection* roles, MgStringCollection* groups)
 {
-    CHECKNULL      ( (MgStringCollection*) roles,  L"MgSite::RevokeRoleMembershipsFromGroups" )
-    CHECKNULL      ( (MgStringCollection*) groups, L"MgSite::RevokeRoleMembershipsFromGroups" )
+    CHECKARGUMENTNULL((MgStringCollection*)roles, L"MgSite::RevokeRoleMembershipsFromGroups")
+    CHECKARGUMENTNULL((MgStringCollection*)groups, L"MgSite::RevokeRoleMembershipsFromGroups")
 
     MgCommand cmd;
 

Modified: trunk/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -807,7 +807,7 @@
 
 MgEnvelope* MgSelectionBase::GetExtents(MgFeatureService* featureService)
 {
-    CHECKNULL((MgFeatureService*)featureService, L"MgSelection.GetExtents");
+    CHECKARGUMENTNULL((MgFeatureService*)featureService, L"MgSelection.GetExtents");
 
     Ptr<MgEnvelope> env;
     Ptr<MgReadOnlyLayerCollection> roLayerCol = this->GetLayers();
@@ -851,7 +851,7 @@
                                            CREFSTRING filterText,
                                            CREFSTRING geomName)
 {
-    CHECKNULL((MgFeatureService*)featureService, L"MgSelection.GetFeatureExtents");
+    CHECKARGUMENTNULL((MgFeatureService*)featureService, L"MgSelection.GetFeatureExtents");
 
     Ptr<MgFeatureAggregateOptions> geomQryOptions = new MgFeatureAggregateOptions();
     STRING cmd = L"EXTENT(" + geomName + L")";

Modified: trunk/MgDev/Common/PlatformBase/Services/FeatureReader.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/FeatureReader.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Common/PlatformBase/Services/FeatureReader.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -126,7 +126,7 @@
 
 INT16 MgFeatureReader::GetMgPropertyType(MgPropertyDefinition* propDef)
 {
-    CHECKNULL((MgPropertyDefinition*)propDef, L"MgFeatureReader.GetMgPropertyType")
+    CHECKARGUMENTNULL((MgPropertyDefinition*)propDef, L"MgFeatureReader.GetMgPropertyType")
     INT32 mgPropType = 0;
 
     // Whether it is data,geometry,raster,object or association property

Modified: trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -506,7 +506,7 @@
 
 void MgFdoConnectionManager::Close(FdoIConnection* pFdoConnection)
 {
-    CHECKNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.Close()");
+    CHECKARGUMENTNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.Close()");
 
     MG_FDOCONNECTION_MANAGER_TRY()
 
@@ -640,7 +640,7 @@
 
 FdoIConnection* MgFdoConnectionManager::FindFdoConnection(MgResourceIdentifier* resourceIdentifier, bool reuseOnly)
 {
-    CHECKNULL(resourceIdentifier, L"MgFdoConnectionManager.FindFdoConnection");
+    CHECKARGUMENTNULL(resourceIdentifier, L"MgFdoConnectionManager.FindFdoConnection");
 
     FdoPtr<FdoIConnection> pFdoConnection;
 
@@ -788,57 +788,57 @@
 
 void MgFdoConnectionManager::SetConnectionProperties(FdoIConnection *pFdoConnection, MdfModel::FeatureSource *pFeatureSource)
 {
-        CHECKNULL(pFeatureSource, L"MgFdoConnectionManager.SetConnectionProperties");
-        CHECKNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.SetConnectionProperties");
+    CHECKARGUMENTNULL(pFeatureSource, L"MgFdoConnectionManager.SetConnectionProperties");
+    CHECKARGUMENTNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.SetConnectionProperties");
 
-        // Get FdoIConnectionInfo
-        FdoPtr<FdoIConnectionInfo> fdoConnInfo = pFdoConnection->GetConnectionInfo();
-        CHECKNULL((FdoIConnectionInfo*)fdoConnInfo, L"MgFdoConnectionManager.SetConnectionProperties");
+    // Get FdoIConnectionInfo
+    FdoPtr<FdoIConnectionInfo> fdoConnInfo = pFdoConnection->GetConnectionInfo();
+    CHECKNULL((FdoIConnectionInfo*)fdoConnInfo, L"MgFdoConnectionManager.SetConnectionProperties");
 
-        // GetFdoIConnectionPropertyDictionary
-        FdoPtr<FdoIConnectionPropertyDictionary> fdoConnPropertyDict = fdoConnInfo->GetConnectionProperties();
-        CHECKNULL((FdoIConnectionPropertyDictionary*)fdoConnPropertyDict, L"MgFdoConnectionManager.SetConnectionProperties");
+    // GetFdoIConnectionPropertyDictionary
+    FdoPtr<FdoIConnectionPropertyDictionary> fdoConnPropertyDict = fdoConnInfo->GetConnectionProperties();
+    CHECKNULL((FdoIConnectionPropertyDictionary*)fdoConnPropertyDict, L"MgFdoConnectionManager.SetConnectionProperties");
 
-        // Get all all connection properties
-        MdfModel::NameStringPairCollection* parameters = pFeatureSource->GetParameters();
-        CHECKNULL(parameters, L"MgFdoConnectionManager.SetConnectionProperties");
+    // Get all all connection properties
+    MdfModel::NameStringPairCollection* parameters = pFeatureSource->GetParameters();
+    CHECKNULL(parameters, L"MgFdoConnectionManager.SetConnectionProperties");
 
-        for (int i = 0; i < parameters->GetCount(); i++)
+    for (int i = 0; i < parameters->GetCount(); i++)
+    {
+        // Get the Name and Value elements
+        MdfModel::NameStringPair* pair = parameters->GetAt(i);
+        STRING name = (STRING)pair->GetName();
+        STRING value = (STRING)pair->GetValue();
+
+        // If name is null, means invalid xml
+        if (name.empty())
         {
-            // Get the Name and Value elements
-            MdfModel::NameStringPair* pair = parameters->GetAt(i);
-            STRING name = (STRING)pair->GetName();
-            STRING value = (STRING)pair->GetValue();
+            STRING message = MgUtil::GetResourceMessage(MgResources::FeatureService, L"MgInvalidPropertyName");
 
-            // If name is null, means invalid xml
-            if (name.empty())
+            Ptr<MgStringCollection> strCol;
+            if (!message.empty())
             {
-                STRING message = MgUtil::GetResourceMessage(MgResources::FeatureService, L"MgInvalidPropertyName");
+                strCol = new MgStringCollection();
+                strCol->Add(message);
+            }
 
-                Ptr<MgStringCollection> strCol;
-                if (!message.empty())
-                {
-                    strCol = new MgStringCollection();
-                    strCol->Add(message);
-                }
+            throw new MgInvalidFeatureSourceException(L"MgFdoConnectionManager.SetConnectionProperties",
+                __LINE__, __WFILE__, (MgStringCollection*)strCol, L"", NULL);
+        }
 
-                throw new MgInvalidFeatureSourceException(L"MgFdoConnectionManager.SetConnectionProperties",
-                    __LINE__, __WFILE__, (MgStringCollection*)strCol, L"", NULL);
-            }
+        FdoString* propertyName = name.c_str();
+        CHECKNULL(propertyName, L"MgFdoConnectionManager.SetConnectionProperties");
 
-            FdoString* propertyName = name.c_str();
-            CHECKNULL(propertyName, L"MgFdoConnectionManager.SetConnectionProperties");
-
-            // Property value can be null ( optional properties may not have values )
-            if (!value.empty())
+        // Property value can be null ( optional properties may not have values )
+        if (!value.empty())
+        {
+            FdoString* propertyValue = value.c_str();
+            if (propertyValue != NULL)
             {
-                FdoString* propertyValue = value.c_str();
-                if (propertyValue != NULL)
-                {
-                    fdoConnPropertyDict->SetProperty(propertyName, propertyValue);
-                }
+                fdoConnPropertyDict->SetProperty(propertyName, propertyValue);
             }
         }
+    }
 }
 
 void MgFdoConnectionManager::SetConnectionTimeout(FdoIConnection* pFdoConnection, STRING providerName)
@@ -891,7 +891,7 @@
 
 void MgFdoConnectionManager::ActivateSpatialContext(FdoIConnection* pFdoConnection, STRING& spatialContextName)
 {
-    CHECKNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.ActivateSpatialContext()");
+    CHECKARGUMENTNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.ActivateSpatialContext()");
     // If command is not supported we simply return and ignore element from xml
     if (!SupportsCommand(pFdoConnection, FdoCommandType_ActivateSpatialContext))
     {
@@ -919,7 +919,7 @@
 
 void MgFdoConnectionManager::ActivateLongTransaction(FdoIConnection* pFdoConnection, STRING& longTransactionName)
 {
-    CHECKNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.ActivateLongTransaction()");
+    CHECKARGUMENTNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.ActivateLongTransaction()");
 
     // If command is not supported we simply return and ignore element from xml
     if (!SupportsCommand(pFdoConnection, FdoCommandType_ActivateLongTransaction))
@@ -948,7 +948,7 @@
 
 bool MgFdoConnectionManager::SupportsConfiguration(FdoIConnection* pFdoConnection)
 {
-    CHECKNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.SupportsConfiguration");
+    CHECKARGUMENTNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.SupportsConfiguration");
 
     FdoPtr<FdoIConnectionCapabilities> ficc = pFdoConnection->GetConnectionCapabilities();
     CHECKNULL((FdoIConnectionCapabilities*)ficc, L"MgFdoConnectionManager.SupportsConfiguration");
@@ -958,8 +958,8 @@
 
 void MgFdoConnectionManager::SetConfiguration(CREFSTRING provider, FdoIConnection* pFdoConnection, MgResourceIdentifier* resourceIdentifier, STRING& configDataName)
 {
-    CHECKNULL(resourceIdentifier, L"MgFdoConnectionManager.SetConfiguration");
-    CHECKNULL(pFdoConnection, L"MgFdoConnectionManager.SetConfiguration");
+    CHECKARGUMENTNULL(resourceIdentifier, L"MgFdoConnectionManager.SetConfiguration");
+    CHECKARGUMENTNULL(pFdoConnection, L"MgFdoConnectionManager.SetConfiguration");
 
     if (provider.empty())
     {
@@ -1027,7 +1027,7 @@
 
 bool MgFdoConnectionManager::SupportsCommand(FdoIConnection* pFdoConnection, INT32 commandType)
 {
-    CHECKNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.SupportsCommand()");
+    CHECKARGUMENTNULL((FdoIConnection*)pFdoConnection, L"MgFdoConnectionManager.SupportsCommand()");
 
     FdoPtr<FdoICommandCapabilities> fcc = pFdoConnection->GetCommandCapabilities();
     CHECKNULL((FdoICommandCapabilities*)fcc, L"MgFdoConnectionManager::SupportsCommand");

Modified: trunk/MgDev/Server/src/Services/Feature/FeatureGeometricFunctions.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/FeatureGeometricFunctions.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/FeatureGeometricFunctions.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -41,8 +41,8 @@
 
 void MgFeatureGeometricFunctions::Initialize(MgReader* reader, FdoFunction* customFunction, CREFSTRING propertyAlias)
 {
-    CHECKNULL((MgReader*)reader, L"MgFeatureGeometricFunctions.Initialize");
-    CHECKNULL((FdoFunction*)customFunction, L"MgFeatureGeometricFunctions.Initialize");
+    CHECKARGUMENTNULL((MgReader*)reader, L"MgFeatureGeometricFunctions.Initialize");
+    CHECKARGUMENTNULL((FdoFunction*)customFunction, L"MgFeatureGeometricFunctions.Initialize");
 
     if(1 == reader->GetPropertyCount())
     {
@@ -143,8 +143,8 @@
 void MgFeatureGeometricFunctions::ComputeExtents(MgCoordinate* lowerLeft,
                                                     MgCoordinate* upperRight)
 {
-    CHECKNULL((MgCoordinate*)lowerLeft, L"MgFeatureGeometricFunctions.ComputeExtents");
-    CHECKNULL((MgCoordinate*)upperRight, L"MgFeatureGeometricFunctions.ComputeExtents");
+    CHECKARGUMENTNULL((MgCoordinate*)lowerLeft, L"MgFeatureGeometricFunctions.ComputeExtents");
+    CHECKARGUMENTNULL((MgCoordinate*)upperRight, L"MgFeatureGeometricFunctions.ComputeExtents");
 
     if (!m_extentsInitialized)
     {

Modified: trunk/MgDev/Server/src/Services/Feature/FeatureManipulationCommand.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/FeatureManipulationCommand.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/FeatureManipulationCommand.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -27,8 +27,8 @@
 
 MgFeatureManipulationCommand* MgFeatureManipulationCommand::CreateCommand(MgFeatureCommand* webCmd, MgServerFeatureConnection* connection, INT32 cmdId)
 {
-    CHECKNULL(webCmd, L"MgFeatureManipulationCommand.CreateCommand")
-    CHECKNULL(connection, L"MgFeatureManipulationCommand.CreateCommand")
+    CHECKARGUMENTNULL(webCmd, L"MgFeatureManipulationCommand.CreateCommand")
+    CHECKARGUMENTNULL(connection, L"MgFeatureManipulationCommand.CreateCommand")
 
     INT32 cmdType = webCmd->GetCommandType();
     bool supports = false;

Modified: trunk/MgDev/Server/src/Services/Feature/FeatureNumericFunctions.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/FeatureNumericFunctions.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/FeatureNumericFunctions.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -50,8 +50,8 @@
 
 void MgFeatureNumericFunctions::Initialize(MgReader* reader, FdoFunction* customFunction, CREFSTRING propertyAlias)
 {
-    CHECKNULL((MgReader*)reader, L"MgFeatureNumericFunctions.Initialize");
-    CHECKNULL((FdoFunction*)customFunction, L"MgFeatureNumericFunctions.Initialize");
+    CHECKARGUMENTNULL((MgReader*)reader, L"MgFeatureNumericFunctions.Initialize");
+    CHECKARGUMENTNULL((FdoFunction*)customFunction, L"MgFeatureNumericFunctions.Initialize");
 
     if(1 == reader->GetPropertyCount())
     {

Modified: trunk/MgDev/Server/src/Services/Feature/FeatureServiceCommand.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/FeatureServiceCommand.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/FeatureServiceCommand.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -43,7 +43,8 @@
 
 bool MgFeatureServiceCommand::IsFdoSupportedFunction(FdoIConnection* connection, FdoFunction* fdoFunc)
 {
-    CHECKNULL(connection, L"MgServerSelectFeatures.SupportsFunction");
+    CHECKARGUMENTNULL(connection, L"MgServerSelectFeatures.SupportsFunction");
+    CHECKARGUMENTNULL(fdoFunc, L"MgServerSelectFeatures.SupportsFunction");
 
     FdoPtr<FdoIExpressionCapabilities> fec = connection->GetExpressionCapabilities();
     CHECKNULL((FdoIExpressionCapabilities*)fec, L"MgServerSelectFeatures.SupportsFunction");
@@ -80,7 +81,7 @@
 
 bool MgFeatureServiceCommand::SupportsSelectDistinct(FdoIConnection* connection)
 {
-    CHECKNULL((FdoIConnection*)connection, L"MgFeatureServiceCommand.SupportsSelectDistinct");
+    CHECKARGUMENTNULL((FdoIConnection*)connection, L"MgFeatureServiceCommand.SupportsSelectDistinct");
 
     FdoPtr<FdoICommandCapabilities> fcc = connection->GetCommandCapabilities();
     CHECKNULL((FdoICommandCapabilities*)fcc, L"MgFeatureServiceCommand.SupportsSelectDistinct");
@@ -93,7 +94,7 @@
 
 bool MgFeatureServiceCommand::SupportsSelectOrdering(FdoIConnection* connection)
 {
-    CHECKNULL((FdoIConnection*)connection, L"MgFeatureServiceCommand.SupportsSelectOrdering");
+    CHECKARGUMENTNULL((FdoIConnection*)connection, L"MgFeatureServiceCommand.SupportsSelectOrdering");
 
     FdoPtr<FdoICommandCapabilities> fcc = connection->GetCommandCapabilities();
     CHECKNULL((FdoICommandCapabilities*)fcc, L"MgFeatureServiceCommand.SupportsSelectOrdering");
@@ -105,7 +106,7 @@
 
 bool MgFeatureServiceCommand::SupportsSelectGrouping(FdoIConnection* connection)
 {
-    CHECKNULL((FdoIConnection*)connection, L"MgFeatureServiceCommand.SupportsSelectGrouping");
+    CHECKARGUMENTNULL((FdoIConnection*)connection, L"MgFeatureServiceCommand.SupportsSelectGrouping");
 
     FdoPtr<FdoICommandCapabilities> fcc = connection->GetCommandCapabilities();
     CHECKNULL((FdoICommandCapabilities*)fcc, L"MgFeatureServiceCommand.SupportsSelectGrouping");

Modified: trunk/MgDev/Server/src/Services/Feature/FeatureStringFunctions.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/FeatureStringFunctions.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/FeatureStringFunctions.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -39,8 +39,8 @@
 
 void MgFeatureStringFunctions::Initialize(MgReader* reader, FdoFunction* customFunction, CREFSTRING propertyAlias)
 {
-    CHECKNULL((MgReader*)reader, L"MgFeatureStringFunctions.Initialize");
-    CHECKNULL((FdoFunction*)customFunction, L"MgFeatureStringFunctions.Initialize");
+    CHECKARGUMENTNULL((MgReader*)reader, L"MgFeatureStringFunctions.Initialize");
+    CHECKARGUMENTNULL((FdoFunction*)customFunction, L"MgFeatureStringFunctions.Initialize");
 
     if(1 == reader->GetPropertyCount())
     {

Modified: trunk/MgDev/Server/src/Services/Feature/JoinFeatureReader.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/JoinFeatureReader.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/JoinFeatureReader.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -534,7 +534,7 @@
     FdoPtr<FdoClassDefinition> fdoClassDef;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL(mgClassDef, L"MgJoinFeatureReader.GetFdoClassDefinition");
+    CHECKARGUMENTNULL(mgClassDef, L"MgJoinFeatureReader.GetFdoClassDefinition");
 
     STRING name = mgClassDef->GetName();
     assert(!name.empty());
@@ -776,7 +776,7 @@
 
 FdoPropertyDefinition* MgJoinFeatureReader::GetFdoPropertyDefinition(MgPropertyDefinition* mgPropDef)
 {
-    CHECKNULL((MgPropertyDefinition*)mgPropDef, L"MgJoinFeatureReader.GetFdoPropertyDefinition");
+    CHECKARGUMENTNULL((MgPropertyDefinition*)mgPropDef, L"MgJoinFeatureReader.GetFdoPropertyDefinition");
 
     FdoPtr<FdoPropertyDefinition> fdoPropDef;
     MG_FEATURE_SERVICE_TRY()
@@ -885,7 +885,7 @@
     FdoPtr<FdoObjectPropertyDefinition> fdoPropDef;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL((MgObjectPropertyDefinition*)objPropDef, L"MgJoinFeatureReader.GetObjectPropertyDefinition");
+    CHECKARGUMENTNULL((MgObjectPropertyDefinition*)objPropDef, L"MgJoinFeatureReader.GetObjectPropertyDefinition");
 
     fdoPropDef = FdoObjectPropertyDefinition::Create();
     // Retrieve data from MgObjectProperty
@@ -922,7 +922,7 @@
     FdoPtr<FdoGeometricPropertyDefinition> fdoPropDef;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL((MgGeometricPropertyDefinition*)mgPropDef, L"MgJoinFeatureReader.GetGeometricPropertyDefinition");
+    CHECKARGUMENTNULL((MgGeometricPropertyDefinition*)mgPropDef, L"MgJoinFeatureReader.GetGeometricPropertyDefinition");
 
     STRING name = mgPropDef->GetName();
     fdoPropDef = FdoGeometricPropertyDefinition::Create();

Modified: trunk/MgDev/Server/src/Services/Feature/SelectAggregateCommand.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/SelectAggregateCommand.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/SelectAggregateCommand.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -31,7 +31,7 @@
 
 MgSelectAggregateCommand::MgSelectAggregateCommand(MgResourceIdentifier* resource)
 {
-    CHECKNULL((MgResourceIdentifier*)resource, L"MgSelectAggregateCommand.MgSelectAggregateCommand");
+    CHECKARGUMENTNULL((MgResourceIdentifier*)resource, L"MgSelectAggregateCommand.MgSelectAggregateCommand");
 
     // Connect to provider
     m_connection = new MgServerFeatureConnection(resource);

Modified: trunk/MgDev/Server/src/Services/Feature/SelectCommand.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/SelectCommand.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/SelectCommand.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -32,7 +32,7 @@
 
 MgSelectCommand::MgSelectCommand(MgResourceIdentifier* resource)
 {
-    CHECKNULL((MgResourceIdentifier*)resource, L"MgSelectCommand.MgSelectCommand");
+    CHECKARGUMENTNULL((MgResourceIdentifier*)resource, L"MgSelectCommand.MgSelectCommand");
 
     // Connect to provider
     m_connection = new MgServerFeatureConnection(resource);

Modified: trunk/MgDev/Server/src/Services/Feature/ServerDeleteCommand.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerDeleteCommand.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/ServerDeleteCommand.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -32,8 +32,8 @@
 
 MgServerDeleteCommand::MgServerDeleteCommand(MgFeatureCommand* command, MgServerFeatureConnection* connection, INT32 cmdId)
 {
-    CHECKNULL(command, L"MgServerDeleteCommand.MgServerDeleteCommand");
-    CHECKNULL(connection, L"MgServerDeleteCommand.MgServerDeleteCommand");
+    CHECKARGUMENTNULL(command, L"MgServerDeleteCommand.MgServerDeleteCommand");
+    CHECKARGUMENTNULL(connection, L"MgServerDeleteCommand.MgServerDeleteCommand");
 
     m_srvrFeatConn = SAFE_ADDREF((MgServerFeatureConnection*)connection);
     m_featCommand = SAFE_ADDREF((MgDeleteFeatures*)command);

Modified: trunk/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -659,7 +659,7 @@
         throw new MgNullArgumentException(L"MgServerDescribeSchema.SchemaToXml", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
-    CHECKNULL((MgFeatureSchemaCollection*)schema, L"MgServerDescribeSchema.SchemaToXml");
+    CHECKARGUMENTNULL((MgFeatureSchemaCollection*)schema, L"MgServerDescribeSchema.SchemaToXml");
 
     FdoPtr<FdoFeatureSchemaCollection> fdoSchemaCol = MgServerFeatureUtil::GetFdoFeatureSchemaCollection(schema);
 
@@ -683,7 +683,7 @@
         throw new MgNullArgumentException(L"MgServerDescribeSchema.SchemaToXml", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
-    CHECKNULL((MgFeatureSchemaCollection*)schema, L"MgServerDescribeSchema.SchemaToXml");
+    CHECKARGUMENTNULL((MgFeatureSchemaCollection*)schema, L"MgServerDescribeSchema.SchemaToXml");
 
     FdoPtr<FdoFeatureSchemaCollection> fdoSchemaCol = MgServerFeatureUtil::GetFdoFeatureSchemaCollection(schema);
 
@@ -780,7 +780,7 @@
     STRING serializedXml;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL(fdoSchemaCol, L"MgServerDescribeSchema.GetSerializedXml");
+    CHECKARGUMENTNULL(fdoSchemaCol, L"MgServerDescribeSchema.GetSerializedXml");
 
     FdoIoMemoryStreamP fmis = FdoIoMemoryStream::Create();
     CHECKNULL((FdoIoMemoryStream*)fmis, L"MgServerDescribeSchema.GetSerializedXml");
@@ -815,7 +815,7 @@
     STRING serializedXml;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL(fdoSchemaCol, L"MgServerDescribeSchema.GetSerializedXml");
+    CHECKARGUMENTNULL(fdoSchemaCol, L"MgServerDescribeSchema.GetSerializedXml");
 
     FdoIoMemoryStreamP fmis = FdoIoMemoryStream::Create();
     CHECKNULL((FdoIoMemoryStream*)fmis, L"MgServerDescribeSchema.GetSerializedXml");
@@ -1263,7 +1263,7 @@
 ///
 bool MgServerDescribeSchema::IsClassNameHintUsed(FdoIDescribeSchema* fdoCommand)
 {
-    CHECKNULL(fdoCommand, L"MgServerDescribeSchema.IsClassNameHintUsed");
+    CHECKARGUMENTNULL(fdoCommand, L"MgServerDescribeSchema.IsClassNameHintUsed");
 
     FdoPtr<FdoStringCollection> classNames = fdoCommand->GetClassNames();
     bool classNameHintUsed = (NULL != classNames.p);
@@ -1274,7 +1274,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 MgStringCollection* MgServerDescribeSchema::GetSchemaNames(MgFeatureSchemaCollection* schemas)
 {
-    CHECKNULL(schemas, L"MgServerDescribeSchema.GetSchemaNames");
+    CHECKARGUMENTNULL(schemas, L"MgServerDescribeSchema.GetSchemaNames");
 
     Ptr<MgStringCollection> schemaNames = new MgStringCollection();
     INT32 schemaCount = schemas->GetCount();
@@ -1296,7 +1296,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 MgStringCollection* MgServerDescribeSchema::GetClassNames(MgFeatureSchemaCollection* schemas, CREFSTRING schemaName)
 {
-    CHECKNULL(schemas, L"MgServerDescribeSchema.GetClassNames");
+    CHECKARGUMENTNULL(schemas, L"MgServerDescribeSchema.GetClassNames");
 
     Ptr<MgStringCollection> classNames = new MgStringCollection();
     INT32 schemaCount = schemas->GetCount();
@@ -1335,7 +1335,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 MgClassDefinition* MgServerDescribeSchema::GetClassDefinition(MgFeatureSchemaCollection* schemas, CREFSTRING schemaName, CREFSTRING className)
 {
-    CHECKNULL(schemas, L"MgServerDescribeSchema.GetClassDefinition");
+    CHECKARGUMENTNULL(schemas, L"MgServerDescribeSchema.GetClassDefinition");
 
     Ptr<MgClassDefinition> classDef;
     INT32 schemaCount = schemas->GetCount();
@@ -1389,7 +1389,7 @@
     FdoFeatureSchemaCollection* schemas, MgResourceIdentifier* resource,
     CREFSTRING schemaName, CREFSTRING className)
 {
-    CHECKNULL(schemas, L"MgServerDescribeSchema.GetIdentityProperties");
+    CHECKARGUMENTNULL(schemas, L"MgServerDescribeSchema.GetIdentityProperties");
 
     Ptr<MgPropertyDefinitionCollection> idProps = new MgPropertyDefinitionCollection();
     INT32 schemaCount = schemas->GetCount();

Modified: trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -1671,7 +1671,7 @@
 // Helper private method
 void MgServerFeatureService::FeatureSourceToString(MgResourceIdentifier* resource, string& resourceContent)
 {
-    CHECKNULL(resource, L"MgServerFeatureService.FeatureSourceToString");
+    CHECKARGUMENTNULL(resource, L"MgServerFeatureService.FeatureSourceToString");
 
     MgServiceManager* serviceMan = MgServiceManager::GetInstance();
     assert(NULL != serviceMan);

Modified: trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -127,7 +127,7 @@
 
 INT16 MgServerFeatureUtil::GetMgPropertyType(MgPropertyDefinition* propDef)
 {
-    CHECKNULL((MgPropertyDefinition*)propDef, L"MgServerFeatureUtil.GetMgPropertyType")
+    CHECKARGUMENTNULL((MgPropertyDefinition*)propDef, L"MgServerFeatureUtil.GetMgPropertyType")
 
     INT32 mgPropType = 0;
 
@@ -170,7 +170,7 @@
 
 MgPropertyDefinitionCollection* MgServerFeatureUtil::GetPropertyDefinitions(MgReader* reader)
 {
-    CHECKNULL(reader, L"MgServerFeatureUtil.GetPropertyDefinitions");
+    CHECKARGUMENTNULL(reader, L"MgServerFeatureUtil.GetPropertyDefinitions");
 
     // Create a new collection
     Ptr<MgPropertyDefinitionCollection> propDefCol = new MgPropertyDefinitionCollection();
@@ -191,7 +191,7 @@
 
 void MgServerFeatureUtil::GetArguments(FdoFunction* customFunction, REFSTRING name, int &numCats, double& dataMin, double& dataMax, INT16 type)
 {
-    CHECKNULL(customFunction, L"MgFeatureDistribution.GetArguments");
+    CHECKARGUMENTNULL(customFunction, L"MgFeatureDistribution.GetArguments");
 
     dataMin = -DoubleMaxValue;
     dataMax = DoubleMaxValue;
@@ -283,7 +283,7 @@
 
 INT32 MgServerFeatureUtil::GetPropertyDefinition(MgReader* reader, REFSTRING propName)
 {
-    CHECKNULL((MgReader*)reader, L"MgServerFeatureUtil.GetPropertyDefinition");
+    CHECKARGUMENTNULL((MgReader*)reader, L"MgServerFeatureUtil.GetPropertyDefinition");
 
     INT32 cnt = reader->GetPropertyCount();
     if (cnt != 1)
@@ -523,7 +523,7 @@
 MgByteReader* MgServerFeatureUtil::GetRaster(FdoIReader* reader, CREFSTRING rasterPropName,INT32 xSize, INT32 ySize)
 {
     // Null Reader is invalid
-    CHECKNULL(reader, L"MgServerFeatureUtil.GetRaster");
+    CHECKARGUMENTNULL(reader, L"MgServerFeatureUtil.GetRaster");
 
     // Empty property name is invalid
     if (rasterPropName.empty())
@@ -582,8 +582,8 @@
 
 void MgServerFeatureUtil::FillFdoParameterCollection(MgParameterCollection* source, FdoParameterValueCollection* target)
 {
-    CHECKNULL(source, L"MgServerFeatureUtil.FillFdoParameterCollection")
-    CHECKNULL(target, L"MgServerFeatureUtil.FillFdoParameterCollection")
+    CHECKARGUMENTNULL(source, L"MgServerFeatureUtil.FillFdoParameterCollection")
+    CHECKARGUMENTNULL(target, L"MgServerFeatureUtil.FillFdoParameterCollection")
 
     INT32 cnt = source->GetCount();
     for (INT32 i = 0; i < cnt; i++)
@@ -596,8 +596,8 @@
 
 void MgServerFeatureUtil::FillParameterCollection(FdoParameterValueCollection* source, MgParameterCollection* target)
 {
-    CHECKNULL(source, L"MgServerFeatureUtil.FillParameterCollection")
-    CHECKNULL(target, L"MgServerFeatureUtil.FillParameterCollection")
+    CHECKARGUMENTNULL(source, L"MgServerFeatureUtil.FillParameterCollection")
+    CHECKARGUMENTNULL(target, L"MgServerFeatureUtil.FillParameterCollection")
 
     INT32 cnt = source->GetCount();
     for (INT32 i = 0; i < cnt; i++)
@@ -610,8 +610,8 @@
 
 void MgServerFeatureUtil::UpdateParameterCollection(FdoParameterValueCollection* source, MgParameterCollection* target)
 {
-    CHECKNULL(source, L"MgServerFeatureUtil.UpdateParameterCollection")
-    CHECKNULL(target, L"MgServerFeatureUtil.UpdateParameterCollection")
+    CHECKARGUMENTNULL(source, L"MgServerFeatureUtil.UpdateParameterCollection")
+    CHECKARGUMENTNULL(target, L"MgServerFeatureUtil.UpdateParameterCollection")
 
     if (source->GetCount() != target->GetCount())
     {
@@ -637,8 +637,8 @@
 
 void MgServerFeatureUtil::FillFdoPropertyCollection(MgPropertyCollection* srcCol, FdoPropertyValueCollection* paramCol)
 {
-    CHECKNULL(srcCol, L"MgServerFeatureUtil.FillFdoPropertyCollection")
-    CHECKNULL(paramCol, L"MgServerFeatureUtil.FillFdoPropertyCollection")
+    CHECKARGUMENTNULL(srcCol, L"MgServerFeatureUtil.FillFdoPropertyCollection")
+    CHECKARGUMENTNULL(paramCol, L"MgServerFeatureUtil.FillFdoPropertyCollection")
 
     INT32 cnt = srcCol->GetCount();
     for (INT32 i = 0; i < cnt; i++)
@@ -651,7 +651,7 @@
 
 FdoParameterValueCollection* MgServerFeatureUtil::CreateFdoParameterCollection(MgPropertyCollection* srcCol)
 {
-    CHECKNULL(srcCol, L"MgServerFeatureUtil.FillFdoPropertyCollection")
+    CHECKARGUMENTNULL(srcCol, L"MgServerFeatureUtil.FillFdoPropertyCollection")
     FdoPtr<FdoParameterValueCollection> paramCol = FdoParameterValueCollection::Create();
 
     INT32 cnt = srcCol->GetCount();
@@ -667,7 +667,7 @@
 
 MgParameter* MgServerFeatureUtil::FdoParameterValueToMgParameter(FdoParameterValue* fdoParamValue)
 {
-    CHECKNULL(fdoParamValue, L"MgServerFeatureUtil.FdoParameterValueToMgParameter")
+    CHECKARGUMENTNULL(fdoParamValue, L"MgServerFeatureUtil.FdoParameterValueToMgParameter")
     Ptr<MgNullableProperty> prop = dynamic_cast<MgNullableProperty*>(FdoParameterValueToMgProperty(fdoParamValue));
     CHECKNULL(prop, L"MgServerFeatureUtil.FdoParameterValueToMgParameter")
 
@@ -682,7 +682,7 @@
 
 MgProperty* MgServerFeatureUtil::FdoParameterValueToMgProperty(FdoParameterValue* fdoParamValue)
 {
-    CHECKNULL(fdoParamValue, L"MgServerFeatureUtil.FdoParameterValueToMgProperty")
+    CHECKARGUMENTNULL(fdoParamValue, L"MgServerFeatureUtil.FdoParameterValueToMgProperty")
 
     FdoPtr<FdoLiteralValue> fdoLiteralValue = fdoParamValue->GetValue();
     CHECKNULL(fdoLiteralValue, L"MgServerFeatureUtil.FdoParameterValueToMgProperty")
@@ -896,7 +896,7 @@
 
 FdoLiteralValue* MgServerFeatureUtil::MgPropertyToFdoDataValue(MgProperty* srcProp)
 {
-    CHECKNULL(srcProp, L"MgServerFeatureUtil.MgPropertyToFdoProperty")
+    CHECKARGUMENTNULL(srcProp, L"MgServerFeatureUtil.MgPropertyToFdoProperty")
 
     INT16 propType = srcProp->GetPropertyType();
     FdoPtr<FdoLiteralValue> fdoVal;
@@ -1289,7 +1289,7 @@
 
 MgClassDefinition* MgServerFeatureUtil::GetMgClassDefinition(FdoClassDefinition* fdoClassDefinition, bool bSerialize)
 {
-    CHECKNULL(fdoClassDefinition, L"MgServerFeatureUtil.GetMgClassDefinition");
+    CHECKARGUMENTNULL(fdoClassDefinition, L"MgServerFeatureUtil.GetMgClassDefinition");
 
     // Create MgClassDefinition
     Ptr<MgClassDefinition> mgClassDef = new MgClassDefinition();
@@ -1414,7 +1414,7 @@
 
 MgByteReader* MgServerFeatureUtil::SerializeToXml(FdoClassDefinition* classDef)
 {
-    CHECKNULL(classDef, L"MgServerFeatureUtil.SerializeToXml");
+    CHECKARGUMENTNULL(classDef, L"MgServerFeatureUtil.SerializeToXml");
 
     FdoString* className = classDef->GetName();
     FdoFeatureSchemaP pSchema = classDef->GetFeatureSchema();
@@ -1535,7 +1535,7 @@
 
 MgPropertyDefinition* MgServerFeatureUtil::GetMgPropertyDefinition(FdoPropertyDefinition* fdoPropDef)
 {
-    CHECKNULL((FdoPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.GetMgPropertyDefinition");
+    CHECKARGUMENTNULL((FdoPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.GetMgPropertyDefinition");
 
     Ptr<MgPropertyDefinition> propDef;
 
@@ -1635,7 +1635,7 @@
 
 MgObjectPropertyDefinition* MgServerFeatureUtil::GetObjectPropertyDefinition(FdoObjectPropertyDefinition* fdoPropDef)
 {
-    CHECKNULL((FdoObjectPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.GetObjectPropertyDefinition");
+    CHECKARGUMENTNULL((FdoObjectPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.GetObjectPropertyDefinition");
 
     STRING name = STRING(fdoPropDef->GetName());
     Ptr<MgObjectPropertyDefinition> propDef = new MgObjectPropertyDefinition(name);
@@ -1678,7 +1678,7 @@
 
 MgGeometricPropertyDefinition* MgServerFeatureUtil::GetGeometricPropertyDefinition(FdoGeometricPropertyDefinition* fdoPropDef)
 {
-    CHECKNULL((FdoGeometricPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.GetGeometricPropertyDefinition");
+    CHECKARGUMENTNULL((FdoGeometricPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.GetGeometricPropertyDefinition");
 
     STRING name = STRING(fdoPropDef->GetName());
     Ptr<MgGeometricPropertyDefinition> propDef = new MgGeometricPropertyDefinition(name);
@@ -1729,7 +1729,7 @@
 
 MgRasterPropertyDefinition* MgServerFeatureUtil::GetRasterPropertyDefinition(FdoRasterPropertyDefinition* fdoPropDef)
 {
-    CHECKNULL((FdoRasterPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.GetRasterPropertyDefinition");
+    CHECKARGUMENTNULL((FdoRasterPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.GetRasterPropertyDefinition");
 
     STRING name = STRING(fdoPropDef->GetName());
     Ptr<MgRasterPropertyDefinition> propDef = new MgRasterPropertyDefinition(name);
@@ -1771,7 +1771,7 @@
 MgProperty* MgServerFeatureUtil::GetMgProperty(MgReader* reader, CREFSTRING qualifiedPropName, INT16 type)
 {
     // Null Reader is invalid
-    CHECKNULL(reader, L"MgServerFeatureUtil.GetMgProperty");
+    CHECKARGUMENTNULL(reader, L"MgServerFeatureUtil.GetMgProperty");
 
     // No propertyname specified, return NULL
     if (qualifiedPropName.empty())
@@ -2022,7 +2022,7 @@
 MgProperty* MgServerFeatureUtil::GetMgProperty(MgReader* reader, INT32 index, CREFSTRING qualifiedPropName, INT16 type)
 {
     // Null Reader is invalid
-    CHECKNULL(reader, L"MgServerFeatureUtil.GetMgProperty");
+    CHECKARGUMENTNULL(reader, L"MgServerFeatureUtil.GetMgProperty");
 
     Ptr<MgNullableProperty> prop;
 
@@ -2274,7 +2274,7 @@
 
     MG_FEATURE_SERVICE_TRY()
 
-    CHECKNULL(mgSchemaCol, L"MgServerFeatureUtil.GetFdoFeatureSchemaCollection");
+    CHECKARGUMENTNULL(mgSchemaCol, L"MgServerFeatureUtil.GetFdoFeatureSchemaCollection");
     fdoSchemaCol = FdoFeatureSchemaCollection::Create((FdoSchemaElement*)NULL);
 
     INT32 i = 0;
@@ -2309,7 +2309,7 @@
     FdoPtr<FdoFeatureSchema> fdoSchema;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL(mgSchema, L"MgServerFeatureUtil.GetFdoFeatureSchema");
+    CHECKARGUMENTNULL(mgSchema, L"MgServerFeatureUtil.GetFdoFeatureSchema");
 
     fdoSchema = FdoFeatureSchema::Create();
     CHECKNULL(fdoSchema, L"MgServerFeatureUtil.GetFdoFeatureSchema");
@@ -2343,7 +2343,7 @@
     MgClassDefinitionCollection* mgClassDefCol)
 {
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL((MgClassDefinitionCollection*)mgClassDefCol, L"MgServerFeatureUtil.GetFdoClassCollection");
+    CHECKARGUMENTNULL((MgClassDefinitionCollection*)mgClassDefCol, L"MgServerFeatureUtil.GetFdoClassCollection");
 
     INT32 count = mgClassDefCol->GetCount();
     INT32 i = 0;
@@ -2371,8 +2371,8 @@
     FdoPtr<FdoClassDefinition> fdoClassDef;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL(mgClassDef, L"MgServerFeatureUtil.GetFdoClassDefinition");
-    CHECKNULL(fdoClassCol, L"MgServerFeatureUtil.GetFdoClassDefinition");
+    CHECKARGUMENTNULL(mgClassDef, L"MgServerFeatureUtil.GetFdoClassDefinition");
+    CHECKARGUMENTNULL(fdoClassCol, L"MgServerFeatureUtil.GetFdoClassDefinition");
 
     STRING name = mgClassDef->GetName();
     assert(!name.empty());
@@ -2562,7 +2562,7 @@
     MgPropertyDefinition* mgPropDef,
     FdoClassCollection* fdoClassCol)
 {
-    CHECKNULL((MgPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.GetFdoPropertyDefinition");
+    CHECKARGUMENTNULL((MgPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.GetFdoPropertyDefinition");
 
     FdoPtr<FdoPropertyDefinition> fdoPropDef;
     MG_FEATURE_SERVICE_TRY()
@@ -2676,7 +2676,7 @@
     FdoPtr<FdoObjectPropertyDefinition> fdoPropDef;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL((MgObjectPropertyDefinition*)objPropDef, L"MgServerFeatureUtil.GetObjectPropertyDefinition");
+    CHECKARGUMENTNULL((MgObjectPropertyDefinition*)objPropDef, L"MgServerFeatureUtil.GetObjectPropertyDefinition");
 
     fdoPropDef = FdoObjectPropertyDefinition::Create();
     // Retrieve data from MgObjectProperty
@@ -2721,7 +2721,7 @@
     FdoPtr<FdoGeometricPropertyDefinition> fdoPropDef;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL((MgGeometricPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.GetGeometricPropertyDefinition");
+    CHECKARGUMENTNULL((MgGeometricPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.GetGeometricPropertyDefinition");
 
     STRING name = mgPropDef->GetName();
     fdoPropDef = FdoGeometricPropertyDefinition::Create();
@@ -2773,7 +2773,7 @@
     FdoPtr<FdoRasterPropertyDefinition> fdoPropDef;
 
     MG_FEATURE_SERVICE_TRY()
-    CHECKNULL((MgRasterPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.GetRasterPropertyDefinition");
+    CHECKARGUMENTNULL((MgRasterPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.GetRasterPropertyDefinition");
 
     fdoPropDef = FdoRasterPropertyDefinition::Create();
     STRING name = mgPropDef->GetName();
@@ -3005,8 +3005,8 @@
     MgFeatureSchema* mgSchema,
     FdoFeatureSchema* fdoSchema)
 {
-    CHECKNULL(mgSchema, L"MgServerFeatureUtil.UpdateFdoFeatureSchema");
-    CHECKNULL(fdoSchema, L"MgServerFeatureUtil.UpdateFdoFeatureSchema");
+    CHECKARGUMENTNULL(mgSchema, L"MgServerFeatureUtil.UpdateFdoFeatureSchema");
+    CHECKARGUMENTNULL(fdoSchema, L"MgServerFeatureUtil.UpdateFdoFeatureSchema");
 
     MG_FEATURE_SERVICE_TRY()
 
@@ -3030,8 +3030,8 @@
     MgClassDefinitionCollection* mgClassDefCol,
     FdoClassCollection* fdoClassCol)
 {
-    CHECKNULL(mgClassDefCol, L"MgServerFeatureUtil.UpdateFdoClassCollection");
-    CHECKNULL(fdoClassCol, L"MgServerFeatureUtil.UpdateFdoClassCollection");
+    CHECKARGUMENTNULL(mgClassDefCol, L"MgServerFeatureUtil.UpdateFdoClassCollection");
+    CHECKARGUMENTNULL(fdoClassCol, L"MgServerFeatureUtil.UpdateFdoClassCollection");
 
     MG_FEATURE_SERVICE_TRY()
 
@@ -3071,9 +3071,9 @@
     FdoClassDefinition* fdoClassDef,
     FdoClassCollection* fdoClassCol)
 {
-    CHECKNULL(mgClassDef, L"MgServerFeatureUtil.UpdateFdoClassDefinition");
-    CHECKNULL(fdoClassDef, L"MgServerFeatureUtil.UpdateFdoClassDefinition");
-    CHECKNULL(fdoClassCol, L"MgServerFeatureUtil.UpdateFdoClassDefinition");
+    CHECKARGUMENTNULL(mgClassDef, L"MgServerFeatureUtil.UpdateFdoClassDefinition");
+    CHECKARGUMENTNULL(fdoClassDef, L"MgServerFeatureUtil.UpdateFdoClassDefinition");
+    CHECKARGUMENTNULL(fdoClassCol, L"MgServerFeatureUtil.UpdateFdoClassDefinition");
 
     MG_FEATURE_SERVICE_TRY()
 
@@ -3267,7 +3267,7 @@
     FdoPropertyDefinition* fdoPropDef,
     FdoClassCollection* fdoClassCol)
 {
-    CHECKNULL((MgPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.UpdateFdoPropertyDefinition");
+    CHECKARGUMENTNULL((MgPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.UpdateFdoPropertyDefinition");
 
     MG_FEATURE_SERVICE_TRY()
 
@@ -3332,8 +3332,8 @@
     MgDataPropertyDefinition* mgPropDef,
     FdoDataPropertyDefinition* fdoPropDef)
 {
-    CHECKNULL(mgPropDef, L"MgServerFeatureUtil.UpdateFdoPropertyDefinition");
-    CHECKNULL(fdoPropDef, L"MgServerFeatureUtil.UpdateFdoPropertyDefinition");
+    CHECKARGUMENTNULL(mgPropDef, L"MgServerFeatureUtil.UpdateFdoPropertyDefinition");
+    CHECKARGUMENTNULL(fdoPropDef, L"MgServerFeatureUtil.UpdateFdoPropertyDefinition");
 
     MG_FEATURE_SERVICE_TRY()
 
@@ -3387,8 +3387,8 @@
     FdoObjectPropertyDefinition* fdoPropDef,
     FdoClassCollection* fdoClassCol)
 {
-    CHECKNULL((MgObjectPropertyDefinition*)objPropDef, L"MgServerFeatureUtil.UpdateObjectPropertyDefinition");
-    CHECKNULL((FdoObjectPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.UpdateObjectPropertyDefinition");
+    CHECKARGUMENTNULL((MgObjectPropertyDefinition*)objPropDef, L"MgServerFeatureUtil.UpdateObjectPropertyDefinition");
+    CHECKARGUMENTNULL((FdoObjectPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.UpdateObjectPropertyDefinition");
 
     MG_FEATURE_SERVICE_TRY()
 
@@ -3447,8 +3447,8 @@
     MgGeometricPropertyDefinition* mgPropDef,
     FdoGeometricPropertyDefinition* fdoPropDef)
 {
-    CHECKNULL((MgGeometricPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.UpdateGeometricPropertyDefinition");
-    CHECKNULL((FdoGeometricPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.UpdateGeometricPropertyDefinition");
+    CHECKARGUMENTNULL((MgGeometricPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.UpdateGeometricPropertyDefinition");
+    CHECKARGUMENTNULL((FdoGeometricPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.UpdateGeometricPropertyDefinition");
 
     MG_FEATURE_SERVICE_TRY()
 
@@ -3519,8 +3519,8 @@
     MgRasterPropertyDefinition* mgPropDef,
     FdoRasterPropertyDefinition* fdoPropDef)
 {
-    CHECKNULL((MgRasterPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.UpdateRasterPropertyDefinition");
-    CHECKNULL((FdoRasterPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.UpdateRasterPropertyDefinition");
+    CHECKARGUMENTNULL((MgRasterPropertyDefinition*)mgPropDef, L"MgServerFeatureUtil.UpdateRasterPropertyDefinition");
+    CHECKARGUMENTNULL((FdoRasterPropertyDefinition*)fdoPropDef, L"MgServerFeatureUtil.UpdateRasterPropertyDefinition");
 
     MG_FEATURE_SERVICE_TRY()
 
@@ -3558,7 +3558,7 @@
 
 FdoIdentifierCollection* MgServerFeatureUtil::ExtractIdentifiers(FdoExpression* expr)
 {
-    CHECKNULL(expr, L"MgServerFeatureUtil.ExtractIdentifiers");
+    CHECKARGUMENTNULL(expr, L"MgServerFeatureUtil.ExtractIdentifiers");
 
     FdoPtr<FdoIdentifierCollection> ret;
     MG_FEATURE_SERVICE_TRY()

Modified: trunk/MgDev/Server/src/Services/Feature/ServerGetFeatureProviders.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerGetFeatureProviders.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/ServerGetFeatureProviders.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -109,7 +109,7 @@
 
 void MgServerGetFeatureProviders::AddConnectionProperties(DOMElement* providerElem, FdoString* providerName)
 {
-    CHECKNULL(providerElem, L"MgServerGetFeatureProviders.AddConnectionProperties");
+    CHECKARGUMENTNULL(providerElem, L"MgServerGetFeatureProviders.AddConnectionProperties");
 
     // Get Properties
     FdoInt32 totalProperties = 0;
@@ -151,9 +151,9 @@
                                                    FdoString* propertyName,
                                                    FdoIConnectionPropertyDictionary* fdoConnPropertyDict)
 {
-    CHECKNULL(connPropRootElem,     L"MgServerGetFeatureProviders.AddConnectionProperty");
-    CHECKNULL(propertyName,         L"MgServerGetFeatureProviders.AddConnectionProperty");
-    CHECKNULL(fdoConnPropertyDict,  L"MgServerGetFeatureProviders.AddConnectionProperty");
+    CHECKARGUMENTNULL(connPropRootElem, L"MgServerGetFeatureProviders.AddConnectionProperty");
+    CHECKARGUMENTNULL(propertyName, L"MgServerGetFeatureProviders.AddConnectionProperty");
+    CHECKARGUMENTNULL(fdoConnPropertyDict, L"MgServerGetFeatureProviders.AddConnectionProperty");
 
     DOMElement* connPropElem = m_xmlUtil->AddChildNode(connPropRootElem, "ConnectionProperty"  /* NOXLATE */ );
 

Modified: trunk/MgDev/Server/src/Services/Feature/ServerGwsFeatureReader.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerGwsFeatureReader.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/ServerGwsFeatureReader.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -1248,25 +1248,25 @@
 
 void MgServerGwsFeatureReader::ResponseStartUtf8(string& str)
 {
-	throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.ResponseStartUtf8",
+    throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.ResponseStartUtf8",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 void MgServerGwsFeatureReader::ResponseEndUtf8(string& str)
 {
-	throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.ResponseEndUtf8",
+    throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.ResponseEndUtf8",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 void MgServerGwsFeatureReader::BodyStartUtf8(string& str)
 {
-	throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.BodyStartUtf8",
+    throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.BodyStartUtf8",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 void MgServerGwsFeatureReader::BodyEndUtf8(string& str)
 {
-	throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.BodyEndUtf8",
+    throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.BodyEndUtf8",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -1278,7 +1278,7 @@
 
 void MgServerGwsFeatureReader::CurrentToStringUtf8(string& str)
 {
-	throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.CurrentToStringUtf8",
+    throw new MgInvalidOperationException(L"MgServerGwsFeatureReader.CurrentToStringUtf8",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -1756,7 +1756,7 @@
 //////////////////////////////////////////////////////////////////
 void MgServerGwsFeatureReader::AddFeature(MgPropertyDefinitionCollection* propDefCol)
 {
-    CHECKNULL(propDefCol, L"MgServerGwsFeatureReader.AddFeature");
+    CHECKARGUMENTNULL(propDefCol, L"MgServerGwsFeatureReader.AddFeature");
 
     Ptr<MgPropertyCollection> propCol = new MgPropertyCollection();
     INT32 cnt = propDefCol->GetCount();
@@ -1938,7 +1938,7 @@
 
 MgByteReader* MgServerGwsFeatureReader::SerializeToXml(FdoClassDefinition* classDef)
 {
-    CHECKNULL(classDef, L"MgServerGwsFeatureReader.SerializeToXml");
+    CHECKARGUMENTNULL(classDef, L"MgServerGwsFeatureReader.SerializeToXml");
 
     FdoString* className = classDef->GetName();
     FdoFeatureSchemaP pSchema = classDef->GetFeatureSchema();

Modified: trunk/MgDev/Server/src/Services/Feature/ServerInsertCommand.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerInsertCommand.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/ServerInsertCommand.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -32,8 +32,8 @@
 
 MgServerInsertCommand::MgServerInsertCommand(MgFeatureCommand* command, MgServerFeatureConnection* connection, INT32 cmdId)
 {
-    CHECKNULL(command, L"MgServerInsertCommand.MgServerInsertCommand");
-    CHECKNULL(connection, L"MgServerInsertCommand.MgServerInsertCommand");
+    CHECKARGUMENTNULL(command, L"MgServerInsertCommand.MgServerInsertCommand");
+    CHECKARGUMENTNULL(connection, L"MgServerInsertCommand.MgServerInsertCommand");
 
     m_srvrFeatConn = SAFE_ADDREF((MgServerFeatureConnection*)connection);
     m_featCommand = SAFE_ADDREF((MgInsertFeatures*)command);

Modified: trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -697,7 +697,7 @@
 
 void MgServerSelectFeatures::AddCustomComputedProperty(CREFSTRING aliasName, FdoExpression* expression)
 {
-    CHECKNULL((FdoExpression*)expression, L"MgServerSelectFeatures.AddCustomComputedProperty");
+    CHECKARGUMENTNULL((FdoExpression*)expression, L"MgServerSelectFeatures.AddCustomComputedProperty");
 
     FdoPtr<FdoIdentifierCollection> fic = m_command->GetPropertyNames();
     CHECKNULL((FdoIdentifierCollection*)fic, L"MgServerSelectFeatures.AddCustomComputedProperty");
@@ -1534,7 +1534,7 @@
 
 void MgServerSelectFeatures::ParseQualifiedClassNameForCalculation(MdfModel::Extension* extension, CREFSTRING qualifiedClassName, STRING& schemaName, STRING& className)
 {
-    CHECKNULL(extension, L"MgServerSelectFeatures.ParseQualifiedClassNameForCalculation");
+    CHECKARGUMENTNULL(extension, L"MgServerSelectFeatures.ParseQualifiedClassNameForCalculation");
 
     MgUtil::ParseQualifiedClassName(qualifiedClassName, schemaName, className);
 

Modified: trunk/MgDev/Server/src/Services/Feature/ServerUpdateCommand.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerUpdateCommand.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/ServerUpdateCommand.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -32,8 +32,8 @@
 
 MgServerUpdateCommand::MgServerUpdateCommand(MgFeatureCommand* command, MgServerFeatureConnection* connection, INT32 cmdId)
 {
-    CHECKNULL(command, L"MgServerUpdateCommand.MgServerUpdateCommand");
-    CHECKNULL(connection, L"MgServerUpdateCommand.MgServerUpdateCommand");
+    CHECKARGUMENTNULL(command, L"MgServerUpdateCommand.MgServerUpdateCommand");
+    CHECKARGUMENTNULL(connection, L"MgServerUpdateCommand.MgServerUpdateCommand");
 
     m_srvrFeatConn = SAFE_ADDREF((MgServerFeatureConnection*)connection);
     m_featCommand = SAFE_ADDREF((MgUpdateFeatures*)command);

Modified: trunk/MgDev/Server/src/Services/Feature/TransformedGeometryFeatureReader.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/TransformedGeometryFeatureReader.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Feature/TransformedGeometryFeatureReader.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -81,7 +81,7 @@
 { 
     bool ret = false;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->IsNull(propertyName);
+    ret = m_innerReader->IsNull(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.IsNull")
     return ret;
 }
@@ -90,7 +90,7 @@
 { 
     bool ret = false;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetBoolean(propertyName);
+    ret = m_innerReader->GetBoolean(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetBoolean")
     return ret;
 }
@@ -99,7 +99,7 @@
 { 
     BYTE ret = 0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetByte(propertyName);
+    ret = m_innerReader->GetByte(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetByte")
     return ret;
 }
@@ -108,7 +108,7 @@
 { 
     Ptr<MgDateTime> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetDateTime(propertyName);
+    ret = m_innerReader->GetDateTime(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetDateTime")
     return ret.Detach();
 }
@@ -117,7 +117,7 @@
 { 
     float ret = 0.0f;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetSingle(propertyName);
+    ret = m_innerReader->GetSingle(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetSingle")
     return ret;
 }
@@ -126,7 +126,7 @@
 { 
     double ret = 0.0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetDouble(propertyName);
+    ret = m_innerReader->GetDouble(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetDouble")
     return ret;
 }
@@ -135,7 +135,7 @@
 { 
     INT16 ret = 0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetInt16(propertyName);
+    ret = m_innerReader->GetInt16(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetInt16")
     return ret;
 }
@@ -144,7 +144,7 @@
 { 
     INT32 ret = 0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetInt32(propertyName);
+    ret = m_innerReader->GetInt32(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetInt32")
     return ret;
 }
@@ -153,7 +153,7 @@
 { 
     INT64 ret = 0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetInt64(propertyName);
+    ret = m_innerReader->GetInt64(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetInt32")
     return ret;
 }
@@ -162,7 +162,7 @@
 { 
     STRING ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetString(propertyName);
+    ret = m_innerReader->GetString(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetString")
     return ret;
 }
@@ -171,7 +171,7 @@
 { 
     Ptr<MgByteReader> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetBLOB(propertyName);
+    ret = m_innerReader->GetBLOB(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetBLOB")
     return ret.Detach();
 }
@@ -180,7 +180,7 @@
 { 
     Ptr<MgByteReader> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetCLOB(propertyName);
+    ret = m_innerReader->GetCLOB(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetCLOB")
     return ret.Detach();
 }
@@ -203,7 +203,7 @@
 { 
     Ptr<MgRaster> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetRaster(propertyName);
+    ret = m_innerReader->GetRaster(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetRaster")
     return ret.Detach();
 }
@@ -217,7 +217,7 @@
 { 
     bool ret = false;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->IsNull(index);
+    ret = m_innerReader->IsNull(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.IsNull")
     return ret;
 }
@@ -226,7 +226,7 @@
 {
     bool ret = false;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetBoolean(index);
+    ret = m_innerReader->GetBoolean(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetBoolean")
     return ret;
 }
@@ -235,7 +235,7 @@
 { 
     BYTE ret = 0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetByte(index);
+    ret = m_innerReader->GetByte(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetByte")
     return ret;
 }
@@ -244,7 +244,7 @@
 { 
     Ptr<MgDateTime> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetDateTime(index);
+    ret = m_innerReader->GetDateTime(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetDateTime")
     return ret.Detach();
 }
@@ -253,7 +253,7 @@
 { 
     float ret = 0.0f;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetSingle(index);
+    ret = m_innerReader->GetSingle(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetSingle")
     return ret;
 }
@@ -262,7 +262,7 @@
 { 
     double ret = 0.0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetDouble(index);
+    ret = m_innerReader->GetDouble(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetDouble")
     return ret;
 }
@@ -271,7 +271,7 @@
 { 
     INT16 ret = 0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetInt16(index);
+    ret = m_innerReader->GetInt16(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetInt16")
     return ret;
 }
@@ -280,7 +280,7 @@
 { 
     INT32 ret = 0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetInt32(index);
+    ret = m_innerReader->GetInt32(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetInt32")
     return ret;
 }
@@ -289,7 +289,7 @@
 { 
     INT64 ret = 0;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetInt64(index);
+    ret = m_innerReader->GetInt64(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetInt64")
     return ret;
 }
@@ -298,7 +298,7 @@
 { 
     STRING ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetString(index);
+    ret = m_innerReader->GetString(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetString")
     return ret;
 }
@@ -307,7 +307,7 @@
 { 
     Ptr<MgByteReader> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetBLOB(index);
+    ret = m_innerReader->GetBLOB(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetBLOB")
     return ret.Detach();
 }
@@ -316,7 +316,7 @@
 { 
     Ptr<MgByteReader> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetCLOB(index);
+    ret = m_innerReader->GetCLOB(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetCLOB")
     return ret.Detach();
 }
@@ -325,14 +325,14 @@
 { 
     Ptr<MgRaster> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetRaster(index);
+    ret = m_innerReader->GetRaster(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetRaster")
     return ret.Detach();
 }
 
 INT32 MgTransformedGeometryFeatureReader::GetReaderType() 
 { 
-	return m_innerReader->GetReaderType();
+    return m_innerReader->GetReaderType();
 }
 
 //EXTERNAL_API:
@@ -341,7 +341,7 @@
 { 
     Ptr<MgByteReader> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->ToXml();
+    ret = m_innerReader->ToXml();
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.ToXml")
     return ret.Detach();
 }
@@ -390,7 +390,7 @@
 
 const wchar_t* MgTransformedGeometryFeatureReader::GetString(CREFSTRING propertyName, INT32& length) 
 {
-	return m_innerReader->GetString(propertyName, length);
+    return m_innerReader->GetString(propertyName, length);
 }
 
 void MgTransformedGeometryFeatureReader::Serialize(MgStream* stream) 
@@ -463,7 +463,7 @@
 { 
     Ptr<MgClassDefinition> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetClassDefinitionNoXml();
+    ret = m_innerReader->GetClassDefinitionNoXml();
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetClassDefinitionNoXml")
     return ret.Detach();
 }
@@ -472,7 +472,7 @@
 { 
     Ptr<MgFeatureReader> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetFeatureObject(propertyName);
+    ret = m_innerReader->GetFeatureObject(propertyName);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetFeatureObject")
     return ret.Detach();
 }
@@ -481,7 +481,7 @@
 { 
     Ptr<MgFeatureReader> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetFeatureObject(index);
+    ret = m_innerReader->GetFeatureObject(index);
     MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgTransformedGeometryFeatureReader.GetFeatureObject")
     return ret.Detach();
 }
@@ -492,7 +492,7 @@
 { 
     Ptr<MgFeatureSet> ret;
     MG_FEATURE_SERVICE_TRY()
-	ret = m_innerReader->GetFeatures(count);
+    ret = m_innerReader->GetFeatures(count);
     if (NULL != m_transform.p)
     {
         for (INT32 i = 0; i < ret->GetCount(); i++)

Modified: trunk/MgDev/Server/src/Services/Mapping/ServerMappingService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Mapping/ServerMappingService.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Mapping/ServerMappingService.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -1260,7 +1260,7 @@
                                                          INT32 requestedFeatures,
                                                          INT32 iconsPerScaleRange)
 {
-    CHECKNULL(map, L"MgServerMappingService.DescribeRuntimeMap");
+    CHECKARGUMENTNULL(map, L"MgServerMappingService.DescribeRuntimeMap");
     return DescribeRuntimeMap(map, MgImageFormats::Png, LEGEND_BITMAP_SIZE, LEGEND_BITMAP_SIZE, requestedFeatures, iconsPerScaleRange);
 }
 
@@ -1516,7 +1516,7 @@
                                                        INT32 requestedFeatures,
                                                        INT32 iconsPerScaleRange)
 {
-    CHECKNULL(mapDefinition, L"MgServerMappingService.CreateRuntimeMap");
+    CHECKARGUMENTNULL(mapDefinition, L"MgServerMappingService.CreateRuntimeMap");
     STRING mapName = mapDefinition->GetName();
     return CreateRuntimeMap(mapDefinition, mapName, sessionId, MgImageFormats::Png, LEGEND_BITMAP_SIZE, LEGEND_BITMAP_SIZE, requestedFeatures, iconsPerScaleRange);
 }

Modified: trunk/MgDev/Server/src/Services/Resource/SiteResourceContentManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/SiteResourceContentManager.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/Services/Resource/SiteResourceContentManager.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -526,7 +526,7 @@
 {
     MG_RESOURCE_SERVICE_TRY()
 
-    CHECKNULL(users, L"MgSiteResourceContentManager.DeleteUsers");
+    CHECKARGUMENTNULL(users, L"MgSiteResourceContentManager.DeleteUsers");
 
     //  iterate through user collection
     INT32 numUsers = users->GetCount();
@@ -1006,7 +1006,7 @@
 {
     MG_RESOURCE_SERVICE_TRY()
 
-    CHECKNULL(groups, L"MgSiteResourceContentManager.DeleteGroups");
+    CHECKARGUMENTNULL(groups, L"MgSiteResourceContentManager.DeleteGroups");
 
     //  iterate through group collection
     INT32 numGroups = groups->GetCount();
@@ -1149,8 +1149,8 @@
 {
     MG_RESOURCE_SERVICE_TRY()
 
-    CHECKNULL( groups,      L"MgSiteResourceContentManager.GrantGroupMembershipsToUsers" );
-    CHECKNULL( users,       L"MgSiteResourceContentManager.GrantGroupMembershipsToUsers" );
+    CHECKARGUMENTNULL(groups, L"MgSiteResourceContentManager.GrantGroupMembershipsToUsers");
+    CHECKARGUMENTNULL(users, L"MgSiteResourceContentManager.GrantGroupMembershipsToUsers");
 
     //  check to make sure users exist
     INT32 numUsers = users->GetCount();
@@ -1294,8 +1294,8 @@
 {
     MG_RESOURCE_SERVICE_TRY()
 
-    CHECKNULL( groups,      L"MgSiteResourceContentManager.RevokeGroupMembershipsFromUsers" );
-    CHECKNULL( users,       L"MgSiteResourceContentManager.RevokeGroupMembershipsFromUsers" );
+    CHECKARGUMENTNULL(groups, L"MgSiteResourceContentManager.RevokeGroupMembershipsFromUsers");
+    CHECKARGUMENTNULL(users, L"MgSiteResourceContentManager.RevokeGroupMembershipsFromUsers");
 
     //  check to make sure users exist
     INT32 numUsers = users->GetCount();
@@ -1539,8 +1539,8 @@
 {
     MG_RESOURCE_SERVICE_TRY()
 
-    CHECKNULL( roles,      L"MgSiteResourceContentManager.GrantRoleMembershipsToUsers" );
-    CHECKNULL( users,       L"MgSiteResourceContentManager.GrantRoleMembershipsToUsers" );
+    CHECKARGUMENTNULL(roles, L"MgSiteResourceContentManager.GrantRoleMembershipsToUsers");
+    CHECKARGUMENTNULL(users, L"MgSiteResourceContentManager.GrantRoleMembershipsToUsers");
 
     //  check to make sure users exist
     INT32 numUsers = users->GetCount();
@@ -1684,8 +1684,8 @@
 {
     MG_RESOURCE_SERVICE_TRY()
 
-    CHECKNULL( roles,       L"MgSiteResourceContentManager.RevokeGroupMembershipsFromUsers" );
-    CHECKNULL( users,       L"MgSiteResourceContentManager.RevokeGroupMembershipsFromUsers" );
+    CHECKARGUMENTNULL(roles, L"MgSiteResourceContentManager.RevokeGroupMembershipsFromUsers");
+    CHECKARGUMENTNULL(users, L"MgSiteResourceContentManager.RevokeGroupMembershipsFromUsers");
 
     //  check to make sure users exist
     INT32 numUsers = users->GetCount();
@@ -1763,8 +1763,8 @@
 {
     MG_RESOURCE_SERVICE_TRY()
 
-    CHECKNULL( roles,       L"MgSiteResourceContentManager.GrantRoleMembershipsToGroups" );
-    CHECKNULL( groups,      L"MgSiteResourceContentManager.GrantRoleMembershipsToGroups" );
+    CHECKARGUMENTNULL(roles, L"MgSiteResourceContentManager.GrantRoleMembershipsToGroups");
+    CHECKARGUMENTNULL(groups, L"MgSiteResourceContentManager.GrantRoleMembershipsToGroups");
 
     //  check to make sure groups exist
     INT32 numGroups = groups->GetCount();
@@ -1917,8 +1917,8 @@
 {
     MG_RESOURCE_SERVICE_TRY()
 
-    CHECKNULL( roles,       L"MgSiteResourceContentManager.RevokeRoleMembershipsFromGroups" );
-    CHECKNULL( groups,      L"MgSiteResourceContentManager.RevokeRoleMembershipsFromGroups" );
+    CHECKARGUMENTNULL(roles, L"MgSiteResourceContentManager.RevokeRoleMembershipsFromGroups");
+    CHECKARGUMENTNULL(groups, L"MgSiteResourceContentManager.RevokeRoleMembershipsFromGroups");
 
     //  check to make sure groups exist
     INT32 numGroups = groups->GetCount();

Modified: trunk/MgDev/Server/src/UnitTesting/TestSiteService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestSiteService.cpp	2015-01-25 09:39:02 UTC (rev 8516)
+++ trunk/MgDev/Server/src/UnitTesting/TestSiteService.cpp	2015-01-26 11:54:48 UTC (rev 8517)
@@ -272,8 +272,8 @@
         Ptr<MgStringCollection> userCollection = new MgStringCollection();
 
         //Try to use NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(NULL, userCollection), MgNullReferenceException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(groupCollection, NULL), MgNullReferenceException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(NULL, userCollection), MgNullArgumentException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->GrantGroupMembershipsToUsers(groupCollection, NULL), MgNullArgumentException*);
 
         //Make both new users members of first group
         groupCollection->Add(groupName1);
@@ -340,8 +340,8 @@
         //Try using NULL arguments
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(NULL,  userCollection), MgNullReferenceException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(roleCollection, NULL), MgNullReferenceException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(NULL, userCollection), MgNullArgumentException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToUsers(roleCollection, NULL), MgNullArgumentException*);
 
         //Try using with a user that does not exist
         roleCollection = new MgStringCollection();
@@ -403,8 +403,8 @@
         //Try using NULL arguments
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(NULL,  groupCollection), MgNullReferenceException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(roleCollection, NULL), MgNullReferenceException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(NULL, groupCollection), MgNullArgumentException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->GrantRoleMembershipsToGroups(roleCollection, NULL), MgNullArgumentException*);
 
         //Try using with a group that does not exist
         roleCollection = new MgStringCollection();
@@ -625,8 +625,8 @@
         Ptr<MgStringCollection> userCollection = new MgStringCollection();
 
         //Try to use NULL arguments
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(NULL, userCollection), MgNullReferenceException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, NULL), MgNullReferenceException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(NULL, userCollection), MgNullArgumentException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->RevokeGroupMembershipsFromUsers(groupCollection, NULL), MgNullArgumentException*);
 
         //Remove both new users from first group
         groupCollection->Add(groupName1);
@@ -686,8 +686,8 @@
         //Try using NULL arguments
         roleCollection = new MgStringCollection();
         userCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(NULL,  userCollection), MgNullReferenceException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, NULL), MgNullReferenceException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(NULL, userCollection), MgNullArgumentException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromUsers(roleCollection, NULL), MgNullArgumentException*);
 
         //Try using with a user that does not exist
         roleCollection = new MgStringCollection();
@@ -749,8 +749,8 @@
         //Try using NULL arguments
         roleCollection = new MgStringCollection();
         groupCollection = new MgStringCollection();
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(NULL,  groupCollection), MgNullReferenceException*);
-        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, NULL), MgNullReferenceException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(NULL, groupCollection), MgNullArgumentException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->RevokeRoleMembershipsFromGroups(roleCollection, NULL), MgNullArgumentException*);
 
         //Try using with a group that does not exist
         roleCollection = new MgStringCollection();
@@ -807,7 +807,7 @@
         }
 
         //Try using a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteUsers(NULL), MgNullReferenceException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->DeleteUsers(NULL), MgNullArgumentException*);
 
         //Delete the two users added earlier
         MgStringCollection userCollection;
@@ -853,7 +853,7 @@
         }
 
         //Try to use a NULL argument
-        CPPUNIT_ASSERT_THROW_MG(pService->DeleteGroups(NULL), MgNullReferenceException*);
+        CPPUNIT_ASSERT_THROW_MG(pService->DeleteGroups(NULL), MgNullArgumentException*);
 
         MgStringCollection groupCollection;
         groupCollection.Add(groupName1);



More information about the mapguide-commits mailing list