[mapguide-commits] r4837 - trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed May 5 09:03:37 EDT 2010


Author: jng
Date: 2010-05-05 09:03:36 -0400 (Wed, 05 May 2010)
New Revision: 4837

Modified:
   trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.cs
Log:
It turns out some errors may slip through even past reading the XML, so if we encounter an exception when reading a FeatureSetRow value when loading data for preview, use null instead.

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.cs	2010-05-05 12:11:13 UTC (rev 4836)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourcePreview/ClassPreviewCtrl.cs	2010-05-05 13:03:36 UTC (rev 4837)
@@ -100,10 +100,17 @@
                     {
                         if (!row.IsValueNull(col.Name))
                         {
-                            if (col.Type == typeof(Topology.Geometries.IGeometry))
-                                drow[col.Name] = ((Topology.Geometries.IGeometry)row[col.Name]).AsText();
-                            else
-                                drow[col.Name] = row[col.Name];
+                            try
+                            {
+                                if (col.Type == typeof(Topology.Geometries.IGeometry))
+                                    drow[col.Name] = ((Topology.Geometries.IGeometry)row[col.Name]).AsText();
+                                else
+                                    drow[col.Name] = row[col.Name];
+                            }
+                            catch
+                            {
+                                drow[col.Name] = DBNull.Value;
+                            }
                         }
                         else
                         {



More information about the mapguide-commits mailing list