[mapguide-commits] r9745 - in sandbox/jng/flatten_exceptions/Common: Foundation/Exception MapGuideCommon/Controller MapGuideCommon/MapLayer MapGuideCommon/Services MapGuideCommon/System PlatformBase PlatformBase/Data PlatformBase/MapLayer PlatformBase/Services PlatformBase/Services/PrintLayoutService

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Oct 21 04:05:48 PDT 2020


Author: jng
Date: 2020-10-21 04:05:48 -0700 (Wed, 21 Oct 2020)
New Revision: 9745

Removed:
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Exception/
Modified:
   sandbox/jng/flatten_exceptions/Common/Foundation/Exception/ExceptionCodes.cpp
   sandbox/jng/flatten_exceptions/Common/Foundation/Exception/ExceptionCodes.h
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/Controller.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/DwfController.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/HtmlController.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/MapLayer/Layer.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/MapLayer/Map.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/Command.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/MapPlot.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/PackageStatusInformation.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyDataReader.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyFeatureService.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ServerInformation.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/Site.h
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/SiteConnection.cpp
   sandbox/jng/flatten_exceptions/Common/MapGuideCommon/System/UserInformation.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Data/IntCollection.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Data/SerializableCollection.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/ChangeList.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/LayerBase.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/MapBase.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/SelectionBase.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/Watermark.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.h
   sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.vcxproj
   sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.vcxproj.filters
   sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBaseBuild.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ClassDefinitionCollection.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/DataPropertyDefinition.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/DeleteFeatures.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureCommandType.h
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureQueryOptions.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSchema.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSchemaCollection.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureService.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSpatialOperations.h
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/GeometryTypeInfo.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/InsertFeatures.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/LockFeatures.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ObjectPropertyType.h
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/OrderingOption.h
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Parameter.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ParameterCollection.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PlatformBaseClassId.h
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/MapViewportBase.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutBase.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutElementBase.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutElementCollection.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutServiceBase.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PropertyMappingCollection.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Raster.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ReaderType.h
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ResourceIdentifier.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ResourceService.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Service.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ServiceRegistry.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/SpatialContextExtentType.h
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/UnlockFeatures.cpp
   sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/UpdateFeatures.cpp
Log:
Remove all exceptions in PlatformBase and modify all throws to throw MgException, passing an exception code instead.

Modified: sandbox/jng/flatten_exceptions/Common/Foundation/Exception/ExceptionCodes.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/Foundation/Exception/ExceptionCodes.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/Foundation/Exception/ExceptionCodes.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -168,4 +168,6 @@
 // These codes aren't in mapguide_en.res
 const STRING MgExceptionCodes::MgConfigurationLoadFailedException = L"MgConfigurationLoadFailedException";
 const STRING MgExceptionCodes::MgResourcesLoadFailedException = L"MgResourcesLoadFailedException";
-const STRING MgExceptionCodes::MgGridDensityException = L"MgGridDensityException";
\ No newline at end of file
+const STRING MgExceptionCodes::MgGridDensityException = L"MgGridDensityException";
+const STRING MgExceptionCodes::MgInvalidLayerDefinitionException = L"MgInvalidLayerDefinitionException";
+const STRING MgExceptionCodes::MgInvalidWatermarkDefinitionException = L"MgInvalidWatermarkDefinitionException";
\ No newline at end of file

Modified: sandbox/jng/flatten_exceptions/Common/Foundation/Exception/ExceptionCodes.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/Foundation/Exception/ExceptionCodes.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/Foundation/Exception/ExceptionCodes.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -160,6 +160,8 @@
     static const STRING MgConfigurationLoadFailedException;    ///\if INTERNAL value("MgConfigurationLoadFailedException") \endif
     static const STRING MgResourcesLoadFailedException;    ///\if INTERNAL value("MgResourcesLoadFailedException") \endif
     static const STRING MgGridDensityException;    ///\if INTERNAL value("MgGridDensityException") \endif
+    static const STRING MgInvalidLayerDefinitionException;    ///\if INTERNAL value("MgInvalidLayerDefinitionException") \endif
+    static const STRING MgInvalidWatermarkDefinitionException;    ///\if INTERNAL value("MgInvalidWatermarkDefinitionException") \endif
 };
 
 #endif
\ No newline at end of file

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/Controller.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/Controller.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/Controller.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -78,7 +78,7 @@
             arguments.Add(m_mapCmdSetViewCenterX);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -104,7 +104,7 @@
             arguments.Add(m_mapCmdSetViewCenterY);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -130,7 +130,7 @@
             arguments.Add(m_mapCmdSetViewScale);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -142,7 +142,7 @@
             arguments.Add(m_mapCmdSetViewScale);
             arguments.Add(sScale);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgMapViewScaleCannotBeLessThanOrEqualToZero", NULL);
         }
 
@@ -165,7 +165,7 @@
             arguments.Add(m_mapCmdSetDisplayDpi);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -177,7 +177,7 @@
             arguments.Add(m_mapCmdSetDisplayDpi);
             arguments.Add(sDpi);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgMapDisplayDpiCannotBeLessThanOrEqualToZero", NULL);
         }
 
@@ -197,7 +197,7 @@
             arguments.Add(m_mapCmdSetDisplayWidth);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -209,7 +209,7 @@
             arguments.Add(m_mapCmdSetDisplayWidth);
             arguments.Add(sWidth);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgMapDisplayWidthCannotBeLessThanOrEqualToZero", NULL);
         }
 
@@ -229,7 +229,7 @@
             arguments.Add(m_mapCmdSetDisplayHeight);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -241,7 +241,7 @@
             arguments.Add(m_mapCmdSetDisplayHeight);
             arguments.Add(sHeight);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgMapDisplayHeightCannotBeLessThanOrEqualToZero", NULL);
         }
 
@@ -261,7 +261,7 @@
             arguments.Add(m_mapCmdShowLayers);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -281,7 +281,7 @@
             arguments.Add(m_mapCmdHideLayers);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -301,7 +301,7 @@
             arguments.Add(m_mapCmdShowGroups);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -321,7 +321,7 @@
             arguments.Add(m_mapCmdHideGroups);
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgController.ApplyMapViewCommands",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ApplyMapViewCommands",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
         }
 
@@ -441,7 +441,7 @@
         arguments.Add(L"1");
         arguments.Add(strEnvelope);
 
-        throw new MgInvalidArgumentException(L"MgController.ParseEnvelope",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgController.ParseEnvelope",
             __LINE__, __WFILE__, &arguments, L"MgInvalidEnvelope", NULL);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/DwfController.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/DwfController.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/DwfController.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -96,7 +96,7 @@
                 arguments.Add(m_mapCmdSetDataExtent);
                 arguments.Add(buffer);
 
-                throw new MgInvalidArgumentException(L"MgDwfController.ApplyMapViewCommands",
+                throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgDwfController.ApplyMapViewCommands",
                     __LINE__, __WFILE__, &arguments, L"MgInvalidPropertyTypeForCommand", NULL);
             }
 

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/HtmlController.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/HtmlController.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Controller/HtmlController.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -153,7 +153,7 @@
 //
 MgByteReader* MgHtmlController::GetLayerImageMap(CREFSTRING mapName, CREFSTRING layerName)
 {
-    throw new MgNotImplementedException(L"MgHtmlController.GetLayerImageMap", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgHtmlController.GetLayerImageMap", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -825,7 +825,7 @@
 //
 STRING MgHtmlController::ScriptViewUpdate(bool forceFullRefresh)
 {
-    throw new MgNotImplementedException(L"MgHtmlController.ScriptViewUpdate", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgHtmlController.ScriptViewUpdate", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -836,7 +836,7 @@
 STRING MgHtmlController::ScriptViewUpdate(MgPoint* center, double scale,
     bool forceFullRefresh)
 {
-    throw new MgNotImplementedException(L"MgHtmlController.ScriptViewUpdate", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgHtmlController.ScriptViewUpdate", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 //////////////////////////////////////////////////////////////////

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/MapLayer/Layer.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/MapLayer/Layer.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/MapLayer/Layer.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -389,7 +389,7 @@
 
         if (string::npos == endIndex)
         {
-            throw new MgXmlParserException(L"MgLayer.UpdateFeatures",
+            throw new MgException(MgExceptionCodes::MgXmlParserException, L"MgLayer.UpdateFeatures",
                 __LINE__, __WFILE__, NULL, L"", NULL);
         }
         else

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/MapLayer/Map.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/MapLayer/Map.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/MapLayer/Map.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -118,7 +118,7 @@
     else if (resource->GetResourceType() == MgResourceType::TileSetDefinition)
         CreateFromTileSet(resourceService, resource, mapName);
     else
-        throw new MgInvalidResourceTypeException(L"MgMap.Create", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidResourceTypeException, L"MgMap.Create", __LINE__, __WFILE__, NULL, L"", NULL);
 
     MG_CATCH_AND_THROW(L"MgMap.Create")
 }
@@ -176,7 +176,7 @@
         STRING errorMsg = parser.GetErrorMessage();
         MgStringCollection arguments;
         arguments.Add(errorMsg);
-        throw new MgInvalidMapDefinitionException(L"MgMap.Create", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidMapDefinitionException, L"MgMap.Create", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // build the runtime map object from the parsed definition
@@ -205,7 +205,7 @@
             STRING errorMsg = parser.GetErrorMessage();
             MgStringCollection arguments;
             arguments.Add(errorMsg);
-            throw new MgInvalidMapDefinitionException(L"MgMap.Create", __LINE__, __WFILE__, &arguments, L"", NULL);
+            throw new MgException(MgExceptionCodes::MgInvalidMapDefinitionException, L"MgMap.Create", __LINE__, __WFILE__, &arguments, L"", NULL);
         }
 
         tdef.reset(parser.DetachTileSetDefinition());
@@ -445,7 +445,7 @@
                 //attach the layer to its group
                 itKg = knownGroups.find(groupName);
                 if(itKg == knownGroups.end())
-                    throw new MgInvalidMapDefinitionException(L"MgMap.Create", __LINE__, __WFILE__, NULL, L"", NULL);
+                    throw new MgException(MgExceptionCodes::MgInvalidMapDefinitionException, L"MgMap.Create", __LINE__, __WFILE__, NULL, L"", NULL);
 
                 rtLayer->SetGroup(itKg->second);
             }
@@ -628,7 +628,7 @@
         STRING errorMsg = parser.GetErrorMessage();
         MgStringCollection arguments;
         arguments.Add(errorMsg);
-        throw new MgInvalidMapDefinitionException(L"MgMap.Create", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidMapDefinitionException, L"MgMap.Create", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // build the runtime map object from the parsed definition
@@ -923,7 +923,7 @@
         arguments.Add(L"0");
         arguments.Add(MgResources::BlankArgument);
 
-        throw new MgInvalidArgumentException(L"MgMap.Open",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgMap.Open",
             __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL);
     }
 
@@ -1114,7 +1114,7 @@
         {
             // If this exception is thrown then the calling code should probably initialize the
             // resource service using SetDelayedLoadResourceService()
-            throw new MgInvalidOperationException(L"MgMap.UnpackLayersAndGroups", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgException(MgExceptionCodes::MgInvalidOperationException, L"MgMap.UnpackLayersAndGroups", __LINE__, __WFILE__, NULL, L"", NULL);
         }
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/Command.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/Command.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/Command.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -342,7 +342,7 @@
             arguments.Add(L"1");
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgCommand.GetResponseResult",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgCommand.GetResponseResult",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidDataType", NULL);
         }
     }

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/MapPlot.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/MapPlot.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/MapPlot.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -237,7 +237,7 @@
 // Serialize data to TCP/IP stream
 void MgMapPlot::Serialize(MgStream* stream)
 {
-    throw new MgNotImplementedException(L"MgMapPlot.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgMapPlot.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 
@@ -245,7 +245,7 @@
 // Deserialize data from TCP/IP stream
 void MgMapPlot::Deserialize(MgStream* stream)
 {
-    throw new MgNotImplementedException(L"MgMapPlot.Deserialize", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgMapPlot.Deserialize", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/PackageStatusInformation.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/PackageStatusInformation.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/PackageStatusInformation.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -197,7 +197,7 @@
      && MgPackageApiName::LoadPackage != m_apiName
      && MgPackageApiName::MakePackage != m_apiName)
     {
-        throw new MgInvalidOperationException(
+        throw new MgException(MgExceptionCodes::MgInvalidOperationException, 
             L"MgPackageStatusInformation.GetStatusMessage",
             __LINE__, __WFILE__, NULL, L"", NULL);
     }
@@ -275,7 +275,7 @@
     if (MgPackageApiName::LoadPackage != apiName &&
         MgPackageApiName::MakePackage != apiName)
     {
-        throw new MgInvalidOperationException(
+        throw new MgException(MgExceptionCodes::MgInvalidOperationException, 
             L"MgPackageStatusInformation.SetApiName",
             __LINE__, __WFILE__, NULL, L"", NULL);
     }

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyDataReader.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyDataReader.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyDataReader.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -811,7 +811,7 @@
         MgStringCollection arguments;
         arguments.Add(propertyName);
 
-        throw new MgNullPropertyValueException(L"MgProxyDataReader.GetProperty",
+        throw new MgException(MgExceptionCodes::MgNullPropertyValueException, "MgProxyDataReader.GetProperty",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
@@ -850,7 +850,7 @@
         MgStringCollection arguments;
         arguments.Add(buffer);
 
-        throw new MgNullPropertyValueException(L"MgProxyDataReader.GetProperty",
+        throw new MgException(MgExceptionCodes::MgNullPropertyValueException, "MgProxyDataReader.GetProperty",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -689,7 +689,7 @@
         MgStringCollection arguments;
         arguments.Add(propertyName);
 
-        throw new MgNullPropertyValueException(L"MgProxyFeatureReader.GetProperty",
+        throw new MgException(MgExceptionCodes::MgNullPropertyValueException, "MgProxyFeatureReader.GetProperty",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
@@ -712,7 +712,7 @@
         MgStringCollection arguments;
         arguments.Add(buffer);
 
-        throw new MgNullPropertyValueException(L"MgProxyFeatureReader.GetProperty",
+        throw new MgException(MgExceptionCodes::MgNullPropertyValueException, "MgProxyFeatureReader.GetProperty",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
@@ -990,7 +990,7 @@
 /// <returns>Returns a ByteReader object</returns>
 BYTE_ARRAY_OUT MgProxyFeatureReader::GetGeometry(CREFSTRING propertyName, INT32& length)
 {
-    throw new MgNotImplementedException(L"MgProxyFeatureReader.GetGeometry",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgProxyFeatureReader.GetGeometry",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -1003,7 +1003,7 @@
 /// <returns>Returns a ByteReader object</returns>
 BYTE_ARRAY_OUT MgProxyFeatureReader::GetGeometry(INT32 index, INT32& length)
 {
-    throw new MgNotImplementedException(L"MgProxyFeatureReader.GetGeometry",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgProxyFeatureReader.GetGeometry",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -1069,7 +1069,7 @@
 
 MgFeatureSet* MgProxyFeatureReader::GetFeatures(INT32 count)
 {
-    throw new MgNotImplementedException(L"MgProxyFeatureReader.GetFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgProxyFeatureReader.GetFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyFeatureService.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyFeatureService.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyFeatureService.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -835,7 +835,7 @@
                                                           CREFSTRING className,
                                                           MgFeatureQueryOptions* options)
 {
-    throw new MgNotImplementedException(
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, 
         L"MgProxyFeatureService::GetLockedFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -623,7 +623,7 @@
         MgStringCollection arguments;
         arguments.Add(propertyName);
 
-        throw new MgNullPropertyValueException(L"MgProxyGwsFeatureReader.GetProperty",
+        throw new MgException(MgExceptionCodes::MgNullPropertyValueException, "MgProxyGwsFeatureReader.GetProperty",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
@@ -662,7 +662,7 @@
         MgStringCollection arguments;
         arguments.Add(buffer);
 
-        throw new MgNullPropertyValueException(L"MgProxyGwsFeatureReader.GetProperty",
+        throw new MgException(MgExceptionCodes::MgNullPropertyValueException, "MgProxyGwsFeatureReader.GetProperty",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
@@ -933,7 +933,7 @@
 /// <returns>Returns a ByteReader object</returns>
 BYTE_ARRAY_OUT MgProxyGwsFeatureReader::GetGeometry(CREFSTRING propertyName, INT32& length)
 {
-    throw new MgNotImplementedException(L"MgProxyGwsFeatureReader.GetGeometry",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgProxyGwsFeatureReader.GetGeometry",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -946,7 +946,7 @@
 /// <returns>Returns a ByteReader object</returns>
 BYTE_ARRAY_OUT MgProxyGwsFeatureReader::GetGeometry(INT32 index, INT32& length)
 {
-    throw new MgNotImplementedException(L"MgProxyGwsFeatureReader.GetGeometry",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgProxyGwsFeatureReader.GetGeometry",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -1012,6 +1012,6 @@
 
 MgFeatureSet* MgProxyGwsFeatureReader::GetFeatures(INT32 count)
 {
-    throw new MgNotImplementedException(L"MgProxyGwsFeatureReader.GetFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgProxyGwsFeatureReader.GetFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -626,7 +626,7 @@
 
 void MgProxySqlDataReader::Serialize(MgStream* stream)
 {
-    throw new MgInvalidOperationException(L"MgProxySqlDataReader.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgInvalidOperationException, L"MgProxySqlDataReader.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -807,7 +807,7 @@
         MgStringCollection arguments;
         arguments.Add(propertyName);
 
-        throw new MgNullPropertyValueException(L"MgProxySqlDataReader.GetProperty",
+        throw new MgException(MgExceptionCodes::MgNullPropertyValueException, "MgProxySqlDataReader.GetProperty",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
@@ -846,7 +846,7 @@
         MgStringCollection arguments;
         arguments.Add(buffer);
 
-        throw new MgNullPropertyValueException(L"MgProxySqlDataReader.GetProperty",
+        throw new MgException(MgExceptionCodes::MgNullPropertyValueException, "MgProxySqlDataReader.GetProperty",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ServerInformation.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ServerInformation.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/ServerInformation.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -246,7 +246,7 @@
         MgStringCollection whyArguments;
         whyArguments.Add(L"[]=");
 
-        throw new MgInvalidArgumentException(L"MgServerInformation.CheckDescription",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgServerInformation.CheckDescription",
             __LINE__, __WFILE__, &arguments, L"MgStringContainsReservedCharacters", &whyArguments);
     }
 }
@@ -302,7 +302,7 @@
         arguments.Add(L"1");
         arguments.Add(serviceName);
 
-        throw new MgInvalidArgumentException(L"MgServerInformation.ToServiceType",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgServerInformation.ToServiceType",
             __LINE__, __WFILE__, &arguments, L"MgNameNotFound", NULL);
     }
 
@@ -336,7 +336,7 @@
         arguments.Add(L"1");
         arguments.Add(buffer);
 
-        throw new MgInvalidArgumentException(L"MgServerInformation.ToServiceName",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgServerInformation.ToServiceName",
             __LINE__, __WFILE__, &arguments, L"MgInvalidServiceType", NULL);
     }
 
@@ -370,7 +370,7 @@
         arguments.Add(L"1");
         arguments.Add(buffer);
 
-        throw new MgInvalidArgumentException(L"MgServerInformation.ToServiceFlag",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgServerInformation.ToServiceFlag",
             __LINE__, __WFILE__, &arguments, L"MgInvalidServiceType", NULL);
     }
 
@@ -590,7 +590,7 @@
         arguments.Add(L"1");
         arguments.Add(buffer);
 
-        throw new MgInvalidArgumentException(L"MgServerInformation.IsServiceEnabled",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgServerInformation.IsServiceEnabled",
             __LINE__, __WFILE__, &arguments, L"MgInvalidServiceType", NULL);
     }
 
@@ -640,7 +640,7 @@
         if (m_address != serverInfo.m_address &&
             0 != MgIpUtil::CompareAddresses(m_address, serverInfo.m_address))
         {
-            throw new MgInvalidOperationException(L"MgServerInformation.CopyFrom",
+            throw new MgException(MgExceptionCodes::MgInvalidOperationException, L"MgServerInformation.CopyFrom",
                 __LINE__, __WFILE__, NULL, L"", NULL);
         }
 

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/Site.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/Site.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/Site.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -43,7 +43,7 @@
         MgStringCollection arguments;                                         \
         arguments.Add(L"1");                                                  \
         arguments.Add(MgResources::BlankArgument);                            \
-        throw new MgInvalidArgumentException(methodName, __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL); \
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, methodName, __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL); \
     }                                                                         \
 
 /// \defgroup MgSite MgSite

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/SiteConnection.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/SiteConnection.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/Services/SiteConnection.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -210,7 +210,7 @@
 
     if (service == NULL)
     {
-        throw new MgServiceNotSupportedException(L"CreateService",
+        throw new MgException(MgExceptionCodes::MgServiceNotSupportedException, L"CreateService",
             __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
@@ -439,7 +439,7 @@
 
     // Send HTTP request to the URL specified for authentication.
 
-    throw new MgNotImplementedException(L"MgSiteConnection.AuthenticateWithHttpServer",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgSiteConnection.AuthenticateWithHttpServer",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -473,7 +473,7 @@
         // THIS SHOULD NEVER BE CALLED!!
         // Servers should be going through the service manager and not MgSiteConnection
         // to get their services.
-        throw new MgNotImplementedException(L"MgSiteConnection.GetConnectionProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgSiteConnection.GetConnectionProperties", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     return connProp.Detach();
@@ -491,7 +491,7 @@
 
     if (m_connProp->IsLocal())
     {
-        throw new MgInvalidOperationException(
+        throw new MgException(MgExceptionCodes::MgInvalidOperationException, 
             L"MgSiteConnection.GetConnectionPropertiesFromSiteServer",
             __LINE__, __WFILE__, NULL, L"", NULL);
     }

Modified: sandbox/jng/flatten_exceptions/Common/MapGuideCommon/System/UserInformation.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/MapGuideCommon/System/UserInformation.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/MapGuideCommon/System/UserInformation.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -208,7 +208,7 @@
         arguments.Add(L"1");
         arguments.Add(sessionId);
 
-        throw new MgInvalidArgumentException(L"MgUserInformation.SetMgSessionId",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgUserInformation.SetMgSessionId",
             __LINE__, __WFILE__, &arguments, L"MgInvalidSessionsId", NULL);
     }
 }
@@ -301,7 +301,7 @@
         {
             MgStringCollection args;
             args.Add(m_locale);
-            throw new MgInvalidArgumentException(L"MgUserInformation.CreateMgSessionId", __LINE__, __WFILE__, NULL, L"MgInvalidLocale", &args);
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgUserInformation.CreateMgSessionId", __LINE__, __WFILE__, NULL, L"MgInvalidLocale", &args);
         }
         locale = m_locale;
     }
@@ -369,7 +369,7 @@
 
 MgByteReader* MgUserInformation::GetReader()
 {
-    throw new MgNotImplementedException(L"MgUserInformation.GetReader", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgUserInformation.GetReader", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 ///////////////////////////////

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Data/IntCollection.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Data/IntCollection.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Data/IntCollection.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -309,7 +309,7 @@
         arguments.Add(L"1");
         arguments.Add(buffer);
 
-        throw new MgInvalidArgumentException(L"MgIntCollection.ValidateIndex",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgIntCollection.ValidateIndex",
             __LINE__, __WFILE__, &arguments, L"MgInvalidValueTooBig", NULL);
     }
     else if (index < 0)
@@ -321,7 +321,7 @@
         arguments.Add(L"1");
         arguments.Add(buffer);
 
-        throw new MgInvalidArgumentException(L"MgIntCollection.ValidateIndex",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgIntCollection.ValidateIndex",
             __LINE__, __WFILE__, &arguments, L"MgInvalidValueTooSmall", NULL);
     }
 }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Data/SerializableCollection.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Data/SerializableCollection.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Data/SerializableCollection.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -215,7 +215,7 @@
 /// </returns>
 MgByteReader* MgSerializableCollection::ToXml()
 {
-    throw new MgNotImplementedException(L"MgSerializableCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgSerializableCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
 
     return NULL;
 }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/ChangeList.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/ChangeList.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/ChangeList.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -110,7 +110,7 @@
 //
 void MgChangeList::Serialize(MgStream* stream)
 {
-    throw new MgNotImplementedException(L"MgChangeList.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgChangeList.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -118,7 +118,7 @@
 //
 void MgChangeList::Deserialize(MgStream* stream)
 {
-    throw new MgNotImplementedException(L"MgChangeList.Deserialize", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgChangeList.Deserialize", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 //////////////////////////////////////////////////////////////////

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/LayerBase.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/LayerBase.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/LayerBase.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -211,7 +211,7 @@
 {
     if (m_type == MgLayerType::BaseMap)
     {
-        throw new MgInvalidOperationException(L"MgLayerBase.SetVisible",
+        throw new MgException(MgExceptionCodes::MgInvalidOperationException, L"MgLayerBase.SetVisible",
             __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
@@ -432,7 +432,7 @@
 void MgLayerBase::Serialize(MgStream* stream)
 {
     MG_TRY()
-    throw new MgNotImplementedException(L"MgLayerBase.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
     MG_CATCH_AND_THROW(L"MgLayerBase.Serialize");
 }
 
@@ -443,7 +443,7 @@
 void MgLayerBase::Deserialize(MgStream* stream)
 {
     MG_TRY()
-    throw new MgNotImplementedException(L"MgLayerBase.Deserialize", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.Deserialize", __LINE__, __WFILE__, NULL, L"", NULL);
     MG_CATCH_AND_THROW(L"MgLayerBase.Deserialize");
 }
 
@@ -577,7 +577,7 @@
         STRING errorMsg = parser.GetErrorMessage();
         MgStringCollection arguments;
         arguments.Add(errorMsg);
-        throw new MgInvalidLayerDefinitionException(L"MgLayerBase::GetLayerDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidLayerDefinitionException, L"MgLayerBase::GetLayerDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // detach the feature layer definition from the parser - it's
@@ -600,7 +600,7 @@
         STRING errorMsg = parser.GetErrorMessage();
         MgStringCollection arguments;
         arguments.Add(errorMsg);
-        throw new MgInvalidLayerDefinitionException(L"MgLayerBase::GetLayerDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidLayerDefinitionException, L"MgLayerBase::GetLayerDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // detach the feature layer definition from the parser - it's
@@ -648,7 +648,7 @@
             STRING errorMsg = parser.GetErrorMessage();
             MgStringCollection arguments;
             arguments.Add(errorMsg);
-            throw new MgInvalidLayerDefinitionException(L"MgLayerBase::GetLayerDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
+            throw new MgException(MgExceptionCodes::MgInvalidLayerDefinitionException, L"MgLayerBase::GetLayerDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
         }
 
         MdfModel::LayerDefinition* ldef = parser.DetachLayerDefinition();
@@ -755,7 +755,7 @@
 ///
 MgClassDefinition* MgLayerBase::GetClassDefinition()
 {
-    throw new MgNotImplementedException(L"MgLayerBase.GetClassDefinition",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.GetClassDefinition",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -769,7 +769,7 @@
 ///
 MgFeatureReader* MgLayerBase::SelectFeatures(MgFeatureQueryOptions* options)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.SelectFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.SelectFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -783,7 +783,7 @@
 ///
 MgFeatureReader* MgLayerBase::SelectFeatures(MgFeatureQueryOptions* options, CREFSTRING coordinateSystem)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.SelectFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.SelectFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -797,7 +797,7 @@
 ///
 MgDataReader* MgLayerBase::SelectAggregate(MgFeatureAggregateOptions* options)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.SelectAggregate",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.SelectAggregate",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -809,49 +809,49 @@
 ///
 MgPropertyCollection* MgLayerBase::UpdateFeatures(MgFeatureCommandCollection* commands)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.UpdateFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.UpdateFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 MgPropertyCollection* MgLayerBase::UpdateFeatures(MgFeatureCommandCollection* commands, MgTransaction* transaction)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.UpdateFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.UpdateFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 MgTransaction* MgLayerBase::BeginTransaction()
 {
-    throw new MgNotImplementedException(L"MgLayerBase.BeginTransaction",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.BeginTransaction",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 MgFeatureReader* MgLayerBase::InsertFeatures(MgPropertyCollection* properties, MgTransaction* transaction)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.InsertFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.InsertFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 MgFeatureReader* MgLayerBase::InsertFeatures(MgBatchPropertyCollection* properties, MgTransaction* transaction)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.InsertFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.InsertFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 INT32 MgLayerBase::UpdateMatchingFeatures(MgPropertyCollection* properties, CREFSTRING filter, MgTransaction* transaction)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.UpdateMatchingFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.UpdateMatchingFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 INT32 MgLayerBase::DeleteFeatures(CREFSTRING filter, MgTransaction* transaction)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.DeleteFeatures",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.DeleteFeatures",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 MgSpatialContextReader* MgLayerBase::GetSpatialContexts(bool bActiveOnly)
 {
-    throw new MgNotImplementedException(L"MgLayerBase.GetSpatialContexts",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgLayerBase.GetSpatialContexts",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/MapBase.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/MapBase.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/MapBase.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -137,7 +137,7 @@
 void MgMapBase::Create(MgResourceService* resourceService, MgResourceIdentifier* mapDefinition, CREFSTRING mapName)
 {
     MG_TRY()
-    throw new MgNotImplementedException(L"MgMapBase.Create", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgMapBase.Create", __LINE__, __WFILE__, NULL, L"", NULL);
     MG_CATCH_AND_THROW(L"MgMapBase.Create")
 }
 
@@ -201,7 +201,7 @@
 void MgMapBase::Open(MgResourceService* resourceService, CREFSTRING mapName)
 {
     MG_TRY()
-    throw new MgNotImplementedException(L"MgMapBase.Open", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgMapBase.Open", __LINE__, __WFILE__, NULL, L"", NULL);
     MG_CATCH_AND_THROW(L"MgMapBase.Open")
 }
 
@@ -279,7 +279,7 @@
 
     if (index >= scaleCount || index < 0)
     {
-        throw new MgIndexOutOfRangeException(L"MgMapBase.GetFiniteDisplayScaleAt",
+        throw new MgException(MgExceptionCodes::MgIndexOutOfRangeException, L"MgMapBase.GetFiniteDisplayScaleAt",
             __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
@@ -396,7 +396,7 @@
 void MgMapBase::Serialize(MgStream* stream)
 {
     MG_TRY()
-    throw new MgNotImplementedException(L"MgMapBase.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgMapBase.Serialize", __LINE__, __WFILE__, NULL, L"", NULL);
     MG_CATCH_AND_THROW(L"MgMapBase.Serialize")
 }
 
@@ -407,7 +407,7 @@
 void MgMapBase::Deserialize(MgStream* stream)
 {
     MG_TRY()
-    throw new MgNotImplementedException(L"MgMapBase.Deserialize", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgMapBase.Deserialize", __LINE__, __WFILE__, NULL, L"", NULL);
     MG_CATCH_AND_THROW(L"MgMapBase.Deserialize")
 }
 
@@ -672,7 +672,7 @@
     {
         changeList = new MgChangeList(objectId, layer);
         if(changeList == NULL)
-            throw new MgOutOfMemoryException(L"MgMapBase.TrackChange", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgException(MgExceptionCodes::MgOutOfMemoryException, L"MgMapBase.TrackChange", __LINE__, __WFILE__, NULL, L"", NULL);
 
         m_changeLists->Add(changeList);
     }
@@ -680,7 +680,7 @@
     //create a change record and adds it to the change list
     Ptr<MgObjectChange> change = new MgObjectChange(type);
     if(change == NULL)
-        throw new MgOutOfMemoryException(L"MgMapBase.TrackChange", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgOutOfMemoryException, L"MgMapBase.TrackChange", __LINE__, __WFILE__, NULL, L"", NULL);
 
     change->SetParam(param);
 
@@ -773,7 +773,7 @@
 ///
 MgService* MgMapBase::GetService(INT32 serviceType)
 {
-    throw new MgNotImplementedException(L"MgMapBase.GetService",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgMapBase.GetService",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -795,7 +795,7 @@
         STRING errorMsg = parser.GetErrorMessage();
         MgStringCollection arguments;
         arguments.Add(errorMsg);
-        throw new MgInvalidMapDefinitionException(L"MgMapBase::GetMapDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidMapDefinitionException, L"MgMapBase::GetMapDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // detach the map definition from the parser - it's
@@ -818,7 +818,7 @@
         STRING errorMsg = parser.GetErrorMessage();
         MgStringCollection arguments;
         arguments.Add(errorMsg);
-        throw new MgInvalidMapDefinitionException(L"MgMapBase::GetMapDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidMapDefinitionException, L"MgMapBase::GetMapDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // detach the map definition from the parser - it's

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/SelectionBase.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/SelectionBase.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/SelectionBase.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -92,12 +92,12 @@
 
 MgFeatureReader* MgSelectionBase::GetSelectedFeatures(MgLayerBase* layer, CREFSTRING className, bool mappedOnly)
 {
-    throw new MgNotImplementedException(L"MgSelectionBase.GetSelectedFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgSelectionBase.GetSelectedFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 MgFeatureReader* MgSelectionBase::GetSelectedFeatures(MgLayerBase* layer, CREFSTRING className, MgStringCollection* propertyNames)
 {
-    throw new MgNotImplementedException(L"MgSelectionBase.GetSelectedFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgSelectionBase.GetSelectedFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 // Read selection from XML document.  Previous selection is cleared.
@@ -438,7 +438,7 @@
 {
     if (0 == (MgMapBase*)m_map)
     {
-        throw new MgInvalidMapDefinitionException(L"MgSelectionBase.GetLayers", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidMapDefinitionException, L"MgSelectionBase.GetLayers", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     Ptr<MgReadOnlyLayerCollection> selLayers = new MgReadOnlyLayerCollection();
@@ -673,7 +673,7 @@
                     }
                     break;
                 default:
-                    throw new MgNotImplementedException(L"MgSelectionBase.GenerateFilters", __LINE__, __WFILE__, NULL, L"", NULL);
+                    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgSelectionBase.GenerateFilters", __LINE__, __WFILE__, NULL, L"", NULL);
                     break;
                 }
 
@@ -1033,7 +1033,7 @@
 //
 void MgSelectionBase::Open(MgResourceService* resourceService, CREFSTRING mapName)
 {
-    throw new MgNotImplementedException(L"MgSelectionBase.Save", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgSelectionBase.Save", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 
@@ -1042,7 +1042,7 @@
 //
 void MgSelectionBase::Save(MgResourceService* resourceService, CREFSTRING mapName)
 {
-    throw new MgNotImplementedException(L"MgSelectionBase.Save", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgSelectionBase.Save", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/Watermark.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/Watermark.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/MapLayer/Watermark.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -39,7 +39,7 @@
         STRING errorMsg = parser.GetErrorMessage();
         MgStringCollection arguments;
         arguments.Add(errorMsg);
-        throw new MgInvalidWatermarkDefinitionException(L"MgWatermark::GetWatermarkDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidWatermarkDefinitionException, L"MgWatermark::GetWatermarkDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // detach the watermark definition from the parser - it's
@@ -62,7 +62,7 @@
         STRING errorMsg = parser.GetErrorMessage();
         MgStringCollection arguments;
         arguments.Add(errorMsg);
-        throw new MgInvalidWatermarkDefinitionException(L"MgWatermark::GetWatermarkDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidWatermarkDefinitionException, L"MgWatermark::GetWatermarkDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // detach the watermark definition from the parser - it's

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -53,33 +53,6 @@
 #include "Data/StringPropertyCollection.h"
 #include "Data/Vector3D.h"
 
-// Exceptions
-#include "Exception/ArrayTypeMismatchException.h"
-#include "Exception/DuplicateResourceDataException.h"
-#include "Exception/DuplicateResourceException.h"
-#include "Exception/EmptyFeatureSetException.h"
-#include "Exception/FdoException.h"
-#include "Exception/FeatureServiceException.h"
-#include "Exception/InvalidLayerDefinitionException.h"
-#include "Exception/InvalidMapDefinitionException.h"
-#include "Exception/InvalidWatermarkDefinitionException.h"
-#include "Exception/InvalidRepositoryNameException.h"
-#include "Exception/InvalidRepositoryTypeException.h"
-#include "Exception/InvalidResourceDataNameException.h"
-#include "Exception/InvalidResourceDataTypeException.h"
-#include "Exception/InvalidResourceNameException.h"
-#include "Exception/InvalidResourcePathException.h"
-#include "Exception/InvalidResourcePreProcessingTypeException.h"
-#include "Exception/InvalidResourceTypeException.h"
-#include "Exception/InvalidSymbolDefinitionException.h"
-#include "Exception/LayerNotFoundException.h"
-#include "Exception/ResourceBusyException.h"
-#include "Exception/ResourceDataNotFoundException.h"
-#include "Exception/ResourceNotFoundException.h"
-#include "Exception/ServiceNotAvailableException.h"
-#include "Exception/ServiceNotSupportedException.h"
-#include "Exception/UserNotFoundException.h"
-
 // Predeclare certain headers required by headers below
 #include "Services/ResourceDefs.h"
 #include "Services/ResourceIdentifier.h"

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.vcxproj
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.vcxproj	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.vcxproj	2020-10-21 11:05:48 UTC (rev 9745)
@@ -298,156 +298,6 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="Exception\ArrayTypeMismatchException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\DuplicateResourceDataException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\DuplicateResourceException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\EmptyFeatureSetException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\FdoException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\FeatureServiceException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidLayerDefinitionException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidMapDefinitionException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidRepositoryNameException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidRepositoryTypeException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourceDataNameException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourceDataTypeException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourceNameException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourcePathException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourcePreProcessingTypeException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourceTypeException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidSymbolDefinitionException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidWatermarkDefinitionException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\LayerNotFoundException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\ResourceBusyException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\ResourceDataNotFoundException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\ResourceNotFoundException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\ServiceNotAvailableException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\ServiceNotSupportedException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="Exception\UserNotFoundException.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
     <ClCompile Include="Services\BaseServiceDefs.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -872,31 +722,6 @@
     <ClInclude Include="Data\Size2D.h" />
     <ClInclude Include="Data\StringPropertyCollection.h" />
     <ClInclude Include="Data\Vector3D.h" />
-    <ClInclude Include="Exception\ArrayTypeMismatchException.h" />
-    <ClInclude Include="Exception\DuplicateResourceDataException.h" />
-    <ClInclude Include="Exception\DuplicateResourceException.h" />
-    <ClInclude Include="Exception\EmptyFeatureSetException.h" />
-    <ClInclude Include="Exception\FdoException.h" />
-    <ClInclude Include="Exception\FeatureServiceException.h" />
-    <ClInclude Include="Exception\InvalidLayerDefinitionException.h" />
-    <ClInclude Include="Exception\InvalidMapDefinitionException.h" />
-    <ClInclude Include="Exception\InvalidRepositoryNameException.h" />
-    <ClInclude Include="Exception\InvalidRepositoryTypeException.h" />
-    <ClInclude Include="Exception\InvalidResourceDataNameException.h" />
-    <ClInclude Include="Exception\InvalidResourceDataTypeException.h" />
-    <ClInclude Include="Exception\InvalidResourceNameException.h" />
-    <ClInclude Include="Exception\InvalidResourcePathException.h" />
-    <ClInclude Include="Exception\InvalidResourcePreProcessingTypeException.h" />
-    <ClInclude Include="Exception\InvalidResourceTypeException.h" />
-    <ClInclude Include="Exception\InvalidSymbolDefinitionException.h" />
-    <ClInclude Include="Exception\InvalidWatermarkDefinitionException.h" />
-    <ClInclude Include="Exception\LayerNotFoundException.h" />
-    <ClInclude Include="Exception\ResourceBusyException.h" />
-    <ClInclude Include="Exception\ResourceDataNotFoundException.h" />
-    <ClInclude Include="Exception\ResourceNotFoundException.h" />
-    <ClInclude Include="Exception\ServiceNotAvailableException.h" />
-    <ClInclude Include="Exception\ServiceNotSupportedException.h" />
-    <ClInclude Include="Exception\UserNotFoundException.h" />
     <ClInclude Include="Services\BaseService.h" />
     <ClInclude Include="Services\BaseServiceDefs.h" />
     <ClInclude Include="Services\ClassDefinition.h" />

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.vcxproj.filters
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.vcxproj.filters	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBase.vcxproj.filters	2020-10-21 11:05:48 UTC (rev 9745)
@@ -4,9 +4,6 @@
     <Filter Include="Data">
       <UniqueIdentifier>{c998d541-b8ef-434e-8be3-ec2660bb9c7c}</UniqueIdentifier>
     </Filter>
-    <Filter Include="Exception">
-      <UniqueIdentifier>{b129b7be-89b1-4995-a47d-e092302b4eae}</UniqueIdentifier>
-    </Filter>
     <Filter Include="Services">
       <UniqueIdentifier>{23ebfbb2-7b3a-49f3-b894-7c930d568034}</UniqueIdentifier>
     </Filter>
@@ -75,81 +72,6 @@
     <ClCompile Include="Data\Vector3D.cpp">
       <Filter>Data</Filter>
     </ClCompile>
-    <ClCompile Include="Exception\ArrayTypeMismatchException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\DuplicateResourceDataException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\DuplicateResourceException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\EmptyFeatureSetException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\FdoException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\FeatureServiceException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidLayerDefinitionException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidMapDefinitionException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidRepositoryNameException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidRepositoryTypeException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourceDataNameException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourceDataTypeException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourceNameException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourcePathException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourcePreProcessingTypeException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidResourceTypeException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidSymbolDefinitionException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\InvalidWatermarkDefinitionException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\LayerNotFoundException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\ResourceBusyException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\ResourceDataNotFoundException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\ResourceNotFoundException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\ServiceNotAvailableException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\ServiceNotSupportedException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
-    <ClCompile Include="Exception\UserNotFoundException.cpp">
-      <Filter>Exception</Filter>
-    </ClCompile>
     <ClCompile Include="Services\BaseServiceDefs.cpp">
       <Filter>Services</Filter>
     </ClCompile>
@@ -411,81 +333,6 @@
     <ClInclude Include="Data\Vector3D.h">
       <Filter>Data</Filter>
     </ClInclude>
-    <ClInclude Include="Exception\ArrayTypeMismatchException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\DuplicateResourceDataException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\DuplicateResourceException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\EmptyFeatureSetException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\FdoException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\FeatureServiceException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidLayerDefinitionException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidMapDefinitionException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidRepositoryNameException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidRepositoryTypeException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidResourceDataNameException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidResourceDataTypeException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidResourceNameException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidResourcePathException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidResourcePreProcessingTypeException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidResourceTypeException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidSymbolDefinitionException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\InvalidWatermarkDefinitionException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\LayerNotFoundException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\ResourceBusyException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\ResourceDataNotFoundException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\ResourceNotFoundException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\ServiceNotAvailableException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\ServiceNotSupportedException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
-    <ClInclude Include="Exception\UserNotFoundException.h">
-      <Filter>Exception</Filter>
-    </ClInclude>
     <ClInclude Include="Services\BaseService.h">
       <Filter>Services</Filter>
     </ClInclude>

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBaseBuild.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBaseBuild.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/PlatformBaseBuild.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -34,31 +34,6 @@
 #include "Data/SingleProperty.cpp"
 #include "Data/StringPropertyCollection.cpp"
 #include "Data/Vector3D.cpp"
-#include "Exception/ArrayTypeMismatchException.cpp"
-#include "Exception/DuplicateResourceDataException.cpp"
-#include "Exception/DuplicateResourceException.cpp"
-#include "Exception/EmptyFeatureSetException.cpp"
-#include "Exception/FdoException.cpp"
-#include "Exception/FeatureServiceException.cpp"
-#include "Exception/InvalidMapDefinitionException.cpp"
-#include "Exception/InvalidLayerDefinitionException.cpp"
-#include "Exception/InvalidWatermarkDefinitionException.cpp"
-#include "Exception/InvalidRepositoryNameException.cpp"
-#include "Exception/InvalidRepositoryTypeException.cpp"
-#include "Exception/InvalidResourceDataNameException.cpp"
-#include "Exception/InvalidResourceDataTypeException.cpp"
-#include "Exception/InvalidResourceNameException.cpp"
-#include "Exception/InvalidResourcePathException.cpp"
-#include "Exception/InvalidResourcePreProcessingTypeException.cpp"
-#include "Exception/InvalidResourceTypeException.cpp"
-#include "Exception/InvalidSymbolDefinitionException.cpp"
-#include "Exception/LayerNotFoundException.cpp"
-#include "Exception/ResourceBusyException.cpp"
-#include "Exception/ResourceDataNotFoundException.cpp"
-#include "Exception/ResourceNotFoundException.cpp"
-#include "Exception/ServiceNotAvailableException.cpp"
-#include "Exception/ServiceNotSupportedException.cpp"
-#include "Exception/UserNotFoundException.cpp"
 #include "MapLayer/ChangeList.cpp"
 #include "MapLayer/LayerBase.cpp"
 #include "MapLayer/LayerCollection.cpp"

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ClassDefinitionCollection.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ClassDefinitionCollection.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ClassDefinitionCollection.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -215,5 +215,5 @@
 
 MgByteReader* MgClassDefinitionCollection::ToXml()
 {
-    throw new MgNotImplementedException(L"ClassDefinitionCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"ClassDefinitionCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
 }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/DataPropertyDefinition.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/DataPropertyDefinition.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/DataPropertyDefinition.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -274,7 +274,7 @@
         arguments.Add(L"1");
         arguments.Add(buffer);
 
-        throw new MgInvalidArgumentException(L"MgDataPropertyDefinition::ValidateArgument",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgDataPropertyDefinition::ValidateArgument",
         __LINE__, __WFILE__, &arguments, L"MgInvalidValueTooSmall", NULL);
    }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/DeleteFeatures.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/DeleteFeatures.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/DeleteFeatures.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -40,7 +40,7 @@
         arguments.Add(L"1");
         arguments.Add(MgResources::BlankArgument);
 
-        throw new MgInvalidArgumentException(L"MgDeleteFeatures.MgDeleteFeatures",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgDeleteFeatures.MgDeleteFeatures",
             __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureCommandType.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureCommandType.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureCommandType.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -63,7 +63,7 @@
             arguments.Add(L"1");
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgFeatureCommandType.ValidateRange",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgFeatureCommandType.ValidateRange",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidValueOutsideRange", NULL);
         }
     }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureQueryOptions.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureQueryOptions.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureQueryOptions.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -461,7 +461,7 @@
         arguments.Add(L"1");
         arguments.Add(MgResources::BlankArgument);
 
-        throw new MgInvalidArgumentException(L"MgFeatureQueryOptions.ValidateEmptyArgument",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgFeatureQueryOptions.ValidateEmptyArgument",
             __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL);
     }
 }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSchema.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSchema.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSchema.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -46,7 +46,7 @@
         arguments.Add(L"1");
         arguments.Add(MgResources::BlankArgument);
 
-        throw new MgInvalidArgumentException(L"MgFeatureSchema.SetName",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgFeatureSchema.SetName",
             __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL);
     }
     m_name = name;

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSchemaCollection.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSchemaCollection.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSchemaCollection.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -261,5 +261,5 @@
 
 MgByteReader* MgFeatureSchemaCollection::ToXml()
 {
-    throw new MgNotImplementedException(L"FeatureSchemaCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"FeatureSchemaCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
 }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureService.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureService.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureService.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -60,7 +60,7 @@
                                                                               CREFSTRING schemaName,
                                                                               CREFSTRING className)
 {
-    throw new MgNotImplementedException(L"MgFeatureService.GetIdentityProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgFeatureService.GetIdentityProperties", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -74,6 +74,6 @@
                                                                      CREFSTRING schemaName,
                                                                      MgStringCollection* classNames)
 {
-    throw new MgNotImplementedException(L"MgFeatureService.GetIdentityProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgFeatureService.GetIdentityProperties", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSpatialOperations.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSpatialOperations.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/FeatureSpatialOperations.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -89,7 +89,7 @@
             arguments.Add(L"1");
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgFeatureSpatialOperations.ValidateRange",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgFeatureSpatialOperations.ValidateRange",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidValueOutsideRange", NULL);
         }
     }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/GeometryTypeInfo.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/GeometryTypeInfo.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/GeometryTypeInfo.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -76,7 +76,7 @@
         arguments.Add(L"1");
         arguments.Add(buffer);
 
-        throw new MgInvalidArgumentException(L"MgGeometryTypeInfo::SetTypes",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgGeometryTypeInfo::SetTypes",
         __LINE__, __WFILE__, &arguments, L"MgInvalidValueTooBig", NULL);
     }
     else if(0 > count)
@@ -88,7 +88,7 @@
         arguments.Add(L"1");
         arguments.Add(buffer);
 
-        throw new MgInvalidArgumentException(L"MgGeometryTypeInfo::SetTypes",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgGeometryTypeInfo::SetTypes",
         __LINE__, __WFILE__, &arguments, L"MgInvalidValueTooSmall", NULL);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/InsertFeatures.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/InsertFeatures.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/InsertFeatures.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -43,7 +43,7 @@
         arguments.Add(L"2");
         arguments.Add(L"0");
 
-        throw new MgInvalidArgumentException(L"MgInsertFeatures.MgInsertFeatures", __LINE__,
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgInsertFeatures.MgInsertFeatures", __LINE__,
             __WFILE__, &arguments, L"MgPropertyValuesEmpty", NULL);
     }
 
@@ -76,7 +76,7 @@
         arguments.Add(L"2");
         arguments.Add(L"0");
 
-        throw new MgInvalidArgumentException(L"MgInsertFeatures.MgInsertFeatures",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgInsertFeatures.MgInsertFeatures",
             __LINE__, __WFILE__, &arguments, L"MgPropertyValuesEmpty", NULL);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/LockFeatures.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/LockFeatures.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/LockFeatures.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -37,7 +37,7 @@
         arguments.Add(L"1");
         arguments.Add(MgResources::BlankArgument);
 
-        throw new MgInvalidArgumentException(L"MgLockFeatures.MgLockFeatures",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgLockFeatures.MgLockFeatures",
             __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ObjectPropertyType.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ObjectPropertyType.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ObjectPropertyType.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -64,7 +64,7 @@
             arguments.Add(L"1");
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgObjectPropertyType.ValidateRange",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgObjectPropertyType.ValidateRange",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidValueOutsideRange", NULL);
         }
     }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/OrderingOption.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/OrderingOption.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/OrderingOption.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -56,7 +56,7 @@
             arguments.Add(L"1");
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgOrderingOption.ValidateRange",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgOrderingOption.ValidateRange",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidValueOutsideRange", NULL);
         }
     }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Parameter.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Parameter.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Parameter.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -21,7 +21,7 @@
 
 #define CHECK_NULL_PARAMETER(method_name) \
     if (NULL == m_parameter) \
-        throw new MgInvalidOperationException(method_name, __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidOperationException, method_name, __LINE__, __WFILE__, NULL, L"", NULL);
 
 ///////////////////////////////////////////////////////////////////
 /// <summary>

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ParameterCollection.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ParameterCollection.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ParameterCollection.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -244,5 +244,5 @@
 
 MgByteReader* MgParameterCollection::ToXml()
 {
-    throw new MgNotImplementedException(L"MgParameterCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgParameterCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
 }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PlatformBaseClassId.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PlatformBaseClassId.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PlatformBaseClassId.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -55,6 +55,9 @@
 #define PlatformBase_Data_Margin                                    PLATFORMBASE_DATA_ID+15
 
 // Platform Exceptions
+//
+// NOTE: Although we removed these exceptions, we are keeping the ids in to prevent these ids from being
+// accidentally used for new classes in the future
 #define PlatformBase_Exception_MgArrayTypeMismatchException                 PLATFORMBASE_EXCEPTION_ID+0
 #define PlatformBase_Exception_MgDuplicateResourceDataException             PLATFORMBASE_EXCEPTION_ID+1
 #define PlatformBase_Exception_MgDuplicateResourceException                 PLATFORMBASE_EXCEPTION_ID+2

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/MapViewportBase.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/MapViewportBase.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/MapViewportBase.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -160,7 +160,7 @@
     {
         if (mapViewport->GetType() != m_type)
         {
-            throw new MgInvalidResourceTypeException(L"MgMapViewportBase.PopulateFromResource",
+            throw new MgException(MgExceptionCodes::MgInvalidResourceTypeException, L"MgMapViewportBase.PopulateFromResource",
                 __LINE__, __WFILE__, NULL, L"", NULL);
         }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutBase.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutBase.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutBase.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -250,7 +250,7 @@
         MgStringCollection arguments;
         arguments.Add(errorMsg);
 
-        throw new MgXmlParserException(L"MgPrintLayoutBase.PopulateFromResource",
+        throw new MgException(MgExceptionCodes::MgXmlParserException, L"MgPrintLayoutBase.PopulateFromResource",
             __LINE__, __WFILE__, NULL, L"MgFormatInnerExceptionMessage", &arguments);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutElementBase.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutElementBase.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutElementBase.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -438,7 +438,7 @@
         MgStringCollection arguments;
         arguments.Add(errorMsg);
 
-        throw new MgXmlParserException(L"MgPrintLayoutElementBase.PopulateFromResource",
+        throw new MgException(MgExceptionCodes::MgXmlParserException, L"MgPrintLayoutElementBase.PopulateFromResource",
             __LINE__, __WFILE__, NULL, L"MgFormatInnerExceptionMessage", &arguments);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutElementCollection.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutElementCollection.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutElementCollection.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -215,6 +215,6 @@
 // Creates an XML document representing the collection.
 MgByteReader* MgPrintLayoutElementCollection::ToXml()
 {
-    throw new MgNotImplementedException(L"PrintLayoutElementCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"PrintLayoutElementCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutServiceBase.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutServiceBase.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PrintLayoutServiceBase.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -102,7 +102,7 @@
 
     if (!resId->IsResourceTypeOf(MgResourceType::PrintLayoutDefinition))
     {
-        throw new MgInvalidResourceTypeException(L"MgPrintLayoutServiceBase.CreatePrintLayout",
+        throw new MgException(MgExceptionCodes::MgInvalidResourceTypeException, L"MgPrintLayoutServiceBase.CreatePrintLayout",
             __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
@@ -120,7 +120,7 @@
     CHECKARGUMENTNULL(resId, L"MgPrintLayoutServiceBase.CreatePrintLayoutElement");
     if (!resId->IsResourceTypeOf(MgResourceType::PrintLayoutElementDefinition))
     {
-        throw new MgInvalidResourceTypeException(L"MgPrintLayoutServiceBase.CreatePrintLayoutElement",
+        throw new MgException(MgExceptionCodes::MgInvalidResourceTypeException, L"MgPrintLayoutServiceBase.CreatePrintLayoutElement",
             __LINE__, __WFILE__, NULL, L"", NULL);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PropertyMappingCollection.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PropertyMappingCollection.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/PrintLayoutService/PropertyMappingCollection.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -213,6 +213,6 @@
 
 MgByteReader* MgPropertyMappingCollection::ToXml()
 {
-    throw new MgNotImplementedException(L"PropertyMappingCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"PropertyMappingCollection.ToXml", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Raster.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Raster.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Raster.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -199,7 +199,7 @@
     // and accessing it.
     if (L"" == m_handle || m_featureService == NULL)
     {
-        throw new MgInvalidOperationException(L"MgRaster.GetStream", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidOperationException, L"MgRaster.GetStream", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     Ptr<MgByteReader> byteReader;
@@ -279,7 +279,7 @@
         MgStringCollection arguments;
         arguments.Add(L"Raster");
 
-        throw new MgNullPropertyValueException(L"MgRaster.NullCheck",
+        throw new MgException(MgExceptionCodes::MgNullPropertyValueException, L"MgRaster.NullCheck",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ReaderType.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ReaderType.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ReaderType.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -60,7 +60,7 @@
             arguments.Add(L"1");
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgReaderType.ValidateRange",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgReaderType.ValidateRange",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidValueOutsideRange", NULL);
         }
     }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ResourceIdentifier.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ResourceIdentifier.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ResourceIdentifier.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -453,7 +453,7 @@
     {
         MgStringCollection args;
         args.Add(resource);
-        throw new MgInvalidRepositoryTypeException(
+        throw new MgException(MgExceptionCodes::MgInvalidRepositoryTypeException, 
             L"MgResourceIdentifier.ParseIdentifier", __LINE__,  __WFILE__, NULL, L"MgBadResourceIdentifer", &args);
     }
 
@@ -522,7 +522,7 @@
             }
             else
             {
-                throw new MgInvalidRepositoryTypeException(
+                throw new MgException(MgExceptionCodes::MgInvalidRepositoryTypeException, 
                     L"MgResourceIdentifier.ParsePathname", __LINE__,  __WFILE__, NULL, L"", NULL);
             }
         }
@@ -569,7 +569,7 @@
      && m_repositoryType != MgRepositoryType::Session
      && m_repositoryType != MgRepositoryType::Site)
     {
-        throw new MgInvalidRepositoryTypeException(
+        throw new MgException(MgExceptionCodes::MgInvalidRepositoryTypeException, 
             L"MgResourceIdentifier.CheckRepositoryType", __LINE__,  __WFILE__, NULL, L"", NULL);
     }
 }
@@ -586,7 +586,7 @@
 {
     if (MgRepositoryType::Session == m_repositoryType && m_repositoryName.empty())
     {
-        throw new MgNullArgumentException(
+        throw new MgException(MgExceptionCodes::MgNullArgumentException, 
             L"MgResourceIdentifier.CheckRepositoryName", __LINE__,  __WFILE__, NULL, L"", NULL);
     }
     else if (MgRepositoryType::Session != m_repositoryType && !m_repositoryName.empty())
@@ -593,7 +593,7 @@
     {
         MgStringCollection arguments;
         arguments.Add(m_repositoryName);
-        throw new MgInvalidRepositoryNameException(
+        throw new MgException(MgExceptionCodes::MgInvalidRepositoryNameException, 
             L"MgResourceIdentifier.CheckRepositoryName", __LINE__,  __WFILE__, &arguments, L"", NULL);
     }
 
@@ -609,7 +609,7 @@
         MgStringCollection arguments;
         arguments.Add(m_repositoryName);
 
-        throw new MgInvalidRepositoryNameException(L"MgResourceIdentifier.CheckRepositoryName",
+        throw new MgException(MgExceptionCodes::MgInvalidRepositoryNameException, L"MgResourceIdentifier.CheckRepositoryName",
             __LINE__,  __WFILE__, &arguments, L"", NULL);
     }
 }
@@ -640,7 +640,7 @@
         MgStringCollection arguments;
         arguments.Add(m_path);
 
-        throw new MgInvalidResourcePathException(L"MgResourceIdentifier.CheckPath",
+        throw new MgException(MgExceptionCodes::MgInvalidResourcePathException, L"MgResourceIdentifier.CheckPath",
             __LINE__,  __WFILE__, &arguments, L"", NULL);
     }
 }
@@ -657,7 +657,7 @@
 {
     if (m_name.empty() && MgResourceType::Folder != m_type)
     {
-        throw new MgNullArgumentException(
+        throw new MgException(MgExceptionCodes::MgNullArgumentException, 
             L"MgResourceIdentifier.CheckName", __LINE__,  __WFILE__, NULL, L"", NULL);
     }
     else if (MgResourceType::Role == m_type
@@ -668,7 +668,7 @@
         MgStringCollection arguments;
         arguments.Add(m_name);
 
-        throw new MgInvalidResourceNameException(L"MgResourceIdentifier.CheckName",
+        throw new MgException(MgExceptionCodes::MgInvalidResourceNameException, L"MgResourceIdentifier.CheckName",
             __LINE__,  __WFILE__, &arguments, L"", NULL);
     }
 
@@ -684,7 +684,7 @@
         MgStringCollection arguments;
         arguments.Add(m_name);
 
-        throw new MgInvalidResourceNameException(L"MgResourceIdentifier.CheckName",
+        throw new MgException(MgExceptionCodes::MgInvalidResourceNameException, L"MgResourceIdentifier.CheckName",
             __LINE__,  __WFILE__, &arguments, L"", NULL);
     }
 }
@@ -710,7 +710,7 @@
     {
         SAFE_RELEASE(e);
 
-        throw new MgInvalidResourceTypeException(
+        throw new MgException(MgExceptionCodes::MgInvalidResourceTypeException, 
                 L"MgResourceIdentifier.CheckType", __LINE__,  __WFILE__, NULL, L"", NULL);
     }
 
@@ -720,7 +720,7 @@
          || MgResourceType::Group == resourceType
          || MgResourceType::Role  == resourceType)
         {
-            throw new MgInvalidResourceTypeException(
+            throw new MgException(MgExceptionCodes::MgInvalidResourceTypeException, 
                 L"MgResourceIdentifier.CheckType", __LINE__,  __WFILE__, NULL, L"", NULL);
         }
     }
@@ -732,7 +732,7 @@
          || MgResourceType::Group     == resourceType
          || MgResourceType::Role      == resourceType)
         {
-            throw new MgInvalidResourceTypeException(
+            throw new MgException(MgExceptionCodes::MgInvalidResourceTypeException, 
                 L"MgResourceIdentifier.CheckType", __LINE__,  __WFILE__, NULL, L"", NULL);
         }
     }
@@ -743,13 +743,13 @@
          && MgResourceType::Role   != resourceType
          && MgResourceType::Folder != resourceType)
         {
-            throw new MgInvalidResourceTypeException(
+            throw new MgException(MgExceptionCodes::MgInvalidResourceTypeException, 
                 L"MgResourceIdentifier.CheckType", __LINE__,  __WFILE__, NULL, L"", NULL);
         }
     }
     else
     {
-        throw new MgInvalidRepositoryTypeException(
+        throw new MgException(MgExceptionCodes::MgInvalidRepositoryTypeException, 
             L"MgResourceIdentifier.CheckType", __LINE__,  __WFILE__, NULL, L"", NULL);
     }
 }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ResourceService.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ResourceService.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ResourceService.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -16,8 +16,6 @@
 //
 
 #include "PlatformBase.h"
-#include "Exception/ServiceNotAvailableException.h"
-#include "Exception/NotImplementedException.h"
 
 //////////////////////////////////////////////////////////////////
 /// <summary>
@@ -92,7 +90,7 @@
     MgResourceIdentifier* resource, INT32 depth, CREFSTRING type,
     INT32 properties, CREFSTRING fromDate, CREFSTRING toDate, bool computeChildren)
 {
-    throw new MgNotImplementedException(L"MgResourceService.EnumerateResources",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgResourceService.EnumerateResources",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -103,7 +101,7 @@
 STRING MgResourceService::EnumerateResourceDocuments(
     MgStringCollection* resources, CREFSTRING type, INT32 properties)
 {
-    throw new MgNotImplementedException(
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, 
         L"MgResourceService.EnumerateResourceDocuments",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
@@ -115,7 +113,7 @@
 void MgResourceService::MoveResource(MgResourceIdentifier* sourceResource,
                    MgResourceIdentifier* destResource, bool overwrite)
 {
-    throw new MgNotImplementedException(L"MgResourceService.MoveResource",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgResourceService.MoveResource",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -122,7 +120,7 @@
 void MgResourceService::MoveResource(MgResourceIdentifier* sourceResource,
                   MgResourceIdentifier* destResource, bool overwrite, bool cascade)
 {
-    throw new MgNotImplementedException(L"MgResourceService.MoveResource",
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgResourceService.MoveResource",
         __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
@@ -163,7 +161,7 @@
 MgStringCollection* MgResourceService::GetResourceContents(MgStringCollection* resources,
                                         MgStringCollection* preProcessTags)
 {
-    throw new MgNotImplementedException(L"MgResourceService.GetResourceContents", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgResourceService.GetResourceContents", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -219,7 +217,7 @@
 void MgResourceService::SetResourceMetadata(
     MgResourceIdentifier* resource, MgByteReader* content)
 {
-    throw new MgNotImplementedException(L"MgResourceService.SetResourceMetadata", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgResourceService.SetResourceMetadata", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 
@@ -238,13 +236,13 @@
 MgByteReader* MgResourceService::GetResourceMetadata(
     MgResourceIdentifier* resource)
 {
-    throw new MgNotImplementedException(L"MgResourceService.GetResourceMetadata", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgResourceService.GetResourceMetadata", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 
 bool MgResourceService::HasPermission(MgResourceIdentifier* resource, CREFSTRING permission)
 {
-    throw new MgNotImplementedException(L"MgResourceService.HasPermission", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgResourceService.HasPermission", __LINE__, __WFILE__, NULL, L"", NULL);
 }
 
 
@@ -256,5 +254,5 @@
 ///
 MgByteReader* MgResourceService::EnumerateUnmanagedData(CREFSTRING path, bool recursive, CREFSTRING type, CREFSTRING filter)
 {
-    throw new MgNotImplementedException(L"MgResourceService.EnumerateUnmanagedData", __LINE__, __WFILE__, NULL, L"", NULL);
+    throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgResourceService.EnumerateUnmanagedData", __LINE__, __WFILE__, NULL, L"", NULL);
 }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Service.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Service.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/Service.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -70,7 +70,7 @@
 MgUserInformation* MgService::GetUserInfo()
 {
     MG_TRY()
-        throw new MgNotImplementedException(L"MgService.GetUserInfo", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgService.GetUserInfo", __LINE__, __WFILE__, NULL, L"", NULL);
     MG_CATCH_AND_THROW(L"MgService.GetUserInfo");
     return NULL;
 }
@@ -83,7 +83,7 @@
 void MgService::SetConnectionProperties(MgConnectionProperties* connProp)
 {
     MG_TRY()
-        throw new MgNotImplementedException(L"MgService.SetConnectionProperties", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgNotImplementedException, L"MgService.SetConnectionProperties", __LINE__, __WFILE__, NULL, L"", NULL);
     MG_CATCH_AND_THROW(L"MgService.SetConnectionProperties");
 }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ServiceRegistry.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ServiceRegistry.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/ServiceRegistry.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -69,7 +69,7 @@
     const ServiceCreatorFunc& func = registry[serviceType];
     if (NULL == func)
     {
-        throw new MgServiceNotSupportedException(L"MgServiceRegistry.CreateService", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgServiceNotSupportedException, L"MgServiceRegistry.CreateService", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     MgService* obj = (*func)();
@@ -82,7 +82,7 @@
 {
     if (NULL == creator)
     {
-        throw new MgInvalidArgumentException(L"MgServiceRegistry.RegisterClass", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgServiceRegistry.RegisterClass", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
     m_serviceCreators[connType][serviceType] = creator;
@@ -170,29 +170,6 @@
     fact->Register(PlatformBase_PrintLayoutService_PrintLayoutElementCollection, MgPrintLayoutElementCollection::CreateObject);
     fact->Register(PlatformBase_PrintLayoutService_PropertyMappingCollection, MgPropertyMappingCollection::CreateObject);
 
-    EXCEPTION_CLASS_CREATOR(MgArrayTypeMismatchException)
-    EXCEPTION_CLASS_CREATOR(MgDuplicateResourceDataException)
-    EXCEPTION_CLASS_CREATOR(MgDuplicateResourceException)
-    EXCEPTION_CLASS_CREATOR(MgEmptyFeatureSetException)
-    EXCEPTION_CLASS_CREATOR(MgFdoException)
-    EXCEPTION_CLASS_CREATOR(MgFeatureServiceException)
-    EXCEPTION_CLASS_CREATOR(MgInvalidMapDefinitionException)
-    EXCEPTION_CLASS_CREATOR(MgInvalidRepositoryNameException)
-    EXCEPTION_CLASS_CREATOR(MgInvalidRepositoryTypeException)
-    EXCEPTION_CLASS_CREATOR(MgInvalidResourceDataNameException)
-    EXCEPTION_CLASS_CREATOR(MgInvalidResourceDataTypeException)
-    EXCEPTION_CLASS_CREATOR(MgInvalidResourceNameException)
-    EXCEPTION_CLASS_CREATOR(MgInvalidResourcePathException)
-    EXCEPTION_CLASS_CREATOR(MgInvalidResourcePreProcessingTypeException)
-    EXCEPTION_CLASS_CREATOR(MgInvalidResourceTypeException)
-    EXCEPTION_CLASS_CREATOR(MgLayerNotFoundException)
-    EXCEPTION_CLASS_CREATOR(MgResourceBusyException)
-    EXCEPTION_CLASS_CREATOR(MgResourceDataNotFoundException)
-    EXCEPTION_CLASS_CREATOR(MgResourceNotFoundException)
-    EXCEPTION_CLASS_CREATOR(MgServiceNotAvailableException)
-    EXCEPTION_CLASS_CREATOR(MgServiceNotSupportedException)
-    EXCEPTION_CLASS_CREATOR(MgUserNotFoundException)
-
     return true;
 }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/SpatialContextExtentType.h
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/SpatialContextExtentType.h	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/SpatialContextExtentType.h	2020-10-21 11:05:48 UTC (rev 9745)
@@ -50,7 +50,7 @@
             arguments.Add(L"1");
             arguments.Add(buffer);
 
-            throw new MgInvalidArgumentException(L"MgSpatialContextExtentType.ValidateRange",
+            throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgSpatialContextExtentType.ValidateRange",
                 __LINE__, __WFILE__, &arguments, L"MgInvalidValueOutsideRange", NULL);
         }
     }

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/UnlockFeatures.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/UnlockFeatures.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/UnlockFeatures.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -32,7 +32,7 @@
         arguments.Add(L"1");
         arguments.Add(MgResources::BlankArgument);
 
-        throw new MgInvalidArgumentException(L"MgUnlockFeatures.MgUnlockFeatures",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgUnlockFeatures.MgUnlockFeatures",
             __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL);
     }
 

Modified: sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/UpdateFeatures.cpp
===================================================================
--- sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/UpdateFeatures.cpp	2020-10-21 10:50:30 UTC (rev 9744)
+++ sandbox/jng/flatten_exceptions/Common/PlatformBase/Services/UpdateFeatures.cpp	2020-10-21 11:05:48 UTC (rev 9745)
@@ -45,7 +45,7 @@
         arguments.Add(L"2");
         arguments.Add(L"0");
 
-        throw new MgInvalidArgumentException(L"MgUpdateFeatures.MgUpdateFeatures",
+        throw new MgException(MgExceptionCodes::MgInvalidArgumentException, L"MgUpdateFeatures.MgUpdateFeatures",
             __LINE__, __WFILE__, &arguments, L"MgCollectionEmpty", NULL);
     }
 



More information about the mapguide-commits mailing list