[mapguide-commits] r7563 - trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Jun 5 22:34:46 PDT 2013
Author: jng
Date: 2013-06-05 22:34:45 -0700 (Wed, 05 Jun 2013)
New Revision: 7563
Modified:
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeDataReader.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeFeatureReader.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeSqlReader.cs
Log:
Extra exception safety for MaestroAPI wrappers to MgReader
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeDataReader.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeDataReader.cs 2013-06-05 13:35:01 UTC (rev 7562)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeDataReader.cs 2013-06-06 05:34:45 UTC (rev 7563)
@@ -53,8 +53,15 @@
{
if (_reader != null)
{
- _reader.Close();
- _reader.Dispose();
+ try
+ {
+ _reader.Close();
+ _reader.Dispose();
+ }
+ catch (MgException ex)
+ {
+ ex.Dispose();
+ }
_reader = null;
}
}
@@ -64,12 +71,26 @@
Close();
if (_agfRw != null)
{
- _agfRw.Dispose();
+ try
+ {
+ _agfRw.Dispose();
+ }
+ catch (MgException ex)
+ {
+ ex.Dispose();
+ }
_agfRw = null;
}
if (_wktRw != null)
{
- _wktRw.Dispose();
+ try
+ {
+ _wktRw.Dispose();
+ }
+ catch (MgException ex)
+ {
+ ex.Dispose();
+ }
_wktRw = null;
}
base.Dispose();
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeFeatureReader.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeFeatureReader.cs 2013-06-05 13:35:01 UTC (rev 7562)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeFeatureReader.cs 2013-06-06 05:34:45 UTC (rev 7563)
@@ -67,12 +67,26 @@
Close();
if (_agfRw != null)
{
- _agfRw.Dispose();
+ try
+ {
+ _agfRw.Dispose();
+ }
+ catch (MgException ex)
+ {
+ ex.Dispose();
+ }
_agfRw = null;
}
if (_wktRw != null)
{
- _wktRw.Dispose();
+ try
+ {
+ _wktRw.Dispose();
+ }
+ catch (MgException ex)
+ {
+ ex.Dispose();
+ }
_wktRw = null;
}
base.Dispose();
@@ -82,8 +96,15 @@
{
if (_reader != null)
{
- _reader.Close();
- _reader.Dispose();
+ try
+ {
+ _reader.Close();
+ _reader.Dispose();
+ }
+ catch (MgException ex)
+ {
+ ex.Dispose();
+ }
_reader = null;
}
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeSqlReader.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeSqlReader.cs 2013-06-05 13:35:01 UTC (rev 7562)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/LocalNativeSqlReader.cs 2013-06-06 05:34:45 UTC (rev 7563)
@@ -51,12 +51,26 @@
Close();
if (_agfRw != null)
{
- _agfRw.Dispose();
+ try
+ {
+ _agfRw.Dispose();
+ }
+ catch (MgException ex)
+ {
+ ex.Dispose();
+ }
_agfRw = null;
}
if (_wktRw != null)
{
- _wktRw.Dispose();
+ try
+ {
+ _wktRw.Dispose();
+ }
+ catch (MgException ex)
+ {
+ ex.Dispose();
+ }
_wktRw = null;
}
base.Dispose();
@@ -82,7 +96,14 @@
public override void Close()
{
- _reader.Close();
+ try
+ {
+ _reader.Close();
+ }
+ catch (MgException ex)
+ {
+ ex.Dispose();
+ }
}
public override string GetName(int index)
More information about the mapguide-commits
mailing list