[mapguide-commits] r4586 - in trunk/Tools/Maestro/Maestro: .
ResourceEditors ResourceEditors/FeatureSourceEditors/Gdal
ResourceEditors/FeatureSourceEditors/ODBC
ResourceEditors/LayerEditorControls/ScaleControls
ResourceEditors/LayoutControls
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Feb 4 13:35:35 EST 2010
Author: ksgeograf
Date: 2010-02-04 13:35:34 -0500 (Thu, 04 Feb 2010)
New Revision: 4586
Modified:
trunk/Tools/Maestro/Maestro/FormMain.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/CoordinateSystemOverride.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditors/Gdal/Composite.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditors/ODBC/FeatureSourceEditorODBC.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditor.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditorControls/ScaleControls/ConditionListButtons.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/LayoutControls/InvokeURL.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/LayoutEditor.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/MapEditor.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/ResourceDataEditor.cs
trunk/Tools/Maestro/Maestro/ResourceEditors/XmlEditorControl.cs
Log:
Maestro:
Pick up LastException in more places.
Modified: trunk/Tools/Maestro/Maestro/FormMain.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/FormMain.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/FormMain.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -1194,7 +1194,10 @@
while (iex is System.Reflection.TargetInvocationException && iex.InnerException != null)
iex = iex.InnerException;
if (!(iex is CancelException))
+ {
+ LastException = ex;
MessageBox.Show(this, string.Format(Strings.FormMain.OpenFailedError, resourceID, iex.ToString()), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
}
}
else
@@ -1307,6 +1310,7 @@
}
catch (Exception ex)
{
+ LastException = ex;
MessageBox.Show(this, string.Format(Strings.FormMain.SaveResourceError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@@ -1338,6 +1342,7 @@
}
catch (Exception ex)
{
+ LastException = ex;
MessageBox.Show(this, string.Format(Strings.FormMain.TemplateLoadError, ex.ToString()), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
@@ -1384,6 +1389,7 @@
}
catch(Exception ex)
{
+ LastException = ex;
MessageBox.Show(this, string.Format(Strings.FormMain.DeleteFolderError, ex.ToString()), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@@ -1406,6 +1412,7 @@
}
catch(Exception ex)
{
+ LastException = ex;
MessageBox.Show(this, string.Format(Strings.FormMain.DeleteResourceError, ex.ToString()), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@@ -1781,6 +1788,7 @@
}
catch (Exception ex)
{
+ LastException = ex;
MessageBox.Show(this, string.Format(Strings.FormMain.PreviewFailedError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
break;
@@ -2024,6 +2032,7 @@
}
catch (Exception ex)
{
+ LastException = ex;
MessageBox.Show(this, string.Format(Strings.FormMain.XmlEditorError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@@ -2095,6 +2104,7 @@
}
catch(Exception ex)
{
+ LastException = ex;
MessageBox.Show(this, string.Format(Strings.FormMain.OpenResourceError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@@ -2134,6 +2144,7 @@
}
catch(Exception ex)
{
+ LastException = ex;
MessageBox.Show(this, string.Format(Strings.FormMain.SaveResourceError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@@ -2327,6 +2338,8 @@
}
catch(Exception ex)
{
+ LastException = ex;
+
if (ex is System.Reflection.TargetInvocationException && ex.InnerException != null)
ex = ex.InnerException;
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/CoordinateSystemOverride.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/CoordinateSystemOverride.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/CoordinateSystemOverride.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -426,6 +426,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(Strings.CoordinateSystemOverride.CoordinateSystemLoadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@@ -471,6 +472,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(Strings.CoordinateSystemOverride.CoordinateSystemLoadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@@ -554,6 +556,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(Strings.CoordinateSystemOverride.CoordinateSystemLoadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditorBase.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -490,6 +490,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(string.Format(Strings.FeatureSourceEditorBase.ResourceSaveError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
@@ -540,6 +541,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(Strings.FeatureSourceEditorBase.XmlUpdateError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditors/Gdal/Composite.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditors/Gdal/Composite.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditors/Gdal/Composite.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -407,6 +407,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(Strings.Composite.FileLoadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditors/ODBC/FeatureSourceEditorODBC.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditors/ODBC/FeatureSourceEditorODBC.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/FeatureSourceEditors/ODBC/FeatureSourceEditorODBC.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -202,6 +202,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditors.ODBC.Strings.FeatureSourceEditorODBC.CoordinateSystemError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@@ -450,6 +451,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditors.ODBC.Strings.FeatureSourceEditorODBC.CoordinateSystemError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@@ -545,7 +547,8 @@
}
catch (Exception ex)
{
- MessageBox.Show(this, string.Format(OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditors.ODBC.Strings.FeatureSourceEditorODBC.SchemaRefreshError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, string.Format(OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditors.ODBC.Strings.FeatureSourceEditorODBC.SchemaRefreshError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@@ -850,7 +853,8 @@
}
catch(Exception ex)
{
- MessageBox.Show(this, string.Format(OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditors.ODBC.Strings.FeatureSourceEditorODBC.ConfigurationReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, string.Format(OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditors.ODBC.Strings.FeatureSourceEditorODBC.ConfigurationReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
@@ -874,7 +878,8 @@
}
catch(Exception ex)
{
- MessageBox.Show(this, string.Format(OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditors.ODBC.Strings.FeatureSourceEditorODBC.DatasourceLayoutReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, string.Format(OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditors.ODBC.Strings.FeatureSourceEditorODBC.DatasourceLayoutReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditor.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditor.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -122,7 +122,8 @@
}
catch (Exception ex)
{
- MessageBox.Show(this, string.Format(Strings.LayerEditor.SchemaReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, string.Format(Strings.LayerEditor.SchemaReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
@@ -610,7 +611,8 @@
}
catch(Exception ex)
{
- MessageBox.Show(this, string.Format(Strings.LayerEditor.MapPreviewError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, string.Format(Strings.LayerEditor.MapPreviewError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return true;
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditorControls/ScaleControls/ConditionListButtons.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditorControls/ScaleControls/ConditionListButtons.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditorControls/ScaleControls/ConditionListButtons.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -135,7 +135,6 @@
try
{
object owner = null;
- object item = null;
if (m_point != null)
owner = m_point;
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/LayoutControls/InvokeURL.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/LayoutControls/InvokeURL.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/LayoutControls/InvokeURL.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -372,7 +372,8 @@
}
catch (Exception ex)
{
- MessageBox.Show(this, string.Format(Strings.InvokeURL.LayerListReadError, mapname, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, string.Format(Strings.InvokeURL.LayerListReadError, mapname, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/LayoutEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/LayoutEditor.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/LayoutEditor.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -1998,7 +1998,8 @@
}
catch (Exception ex)
{
- MessageBox.Show(this, String.Format(Strings.LayoutEditor.BrowserLaunchError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, String.Format(Strings.LayoutEditor.BrowserLaunchError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/MapEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/MapEditor.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/MapEditor.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -1239,6 +1239,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(Strings.MapEditor.LayerProjectionReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@@ -1724,7 +1725,8 @@
}
catch(Exception ex)
{
- MessageBox.Show(this, string.Format(Strings.MapEditor.MapPreviewError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, string.Format(Strings.MapEditor.MapPreviewError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return true;
@@ -1883,6 +1885,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(Strings.MapEditor.LayerProjectionReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
@@ -1893,7 +1896,8 @@
}
catch (Exception ex)
{
- MessageBox.Show(this, string.Format(Strings.MapEditor.LayerExtentReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, string.Format(Strings.MapEditor.LayerExtentReadError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/ResourceDataEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/ResourceDataEditor.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/ResourceDataEditor.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -500,7 +500,7 @@
}
catch (Exception ex)
{
- switch(MessageBox.Show(owner, string.Format(Strings.ResourceDataEditor.DeleteFailedQuestion, resourcename, ex.Message), Application.ProductName, MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error))
+ switch (MessageBox.Show(owner, string.Format(Strings.ResourceDataEditor.DeleteFailedQuestion, resourcename, ex.Message), Application.ProductName, MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error))
{
case DialogResult.Abort:
return res;
@@ -560,7 +560,7 @@
}
catch(Exception ex)
{
- switch(MessageBox.Show(owner, string.Format(Strings.ResourceDataEditor.DownloadFailedQuestion, items[0], ex.Message), Application.ProductName, MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error))
+ switch (MessageBox.Show(owner, string.Format(Strings.ResourceDataEditor.DownloadFailedQuestion, items[0], ex.Message), Application.ProductName, MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error))
{
case DialogResult.Abort:
return res;
@@ -607,7 +607,7 @@
}
catch(Exception ex)
{
- switch(MessageBox.Show(owner, string.Format(Strings.ResourceDataEditor.DownloadFailedQuestion, item, ex.Message), Application.ProductName, MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error))
+ switch (MessageBox.Show(owner, string.Format(Strings.ResourceDataEditor.DownloadFailedQuestion, item, ex.Message), Application.ProductName, MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error))
{
case DialogResult.Abort:
return res;
@@ -673,7 +673,8 @@
}
catch(Exception ex)
{
- switch(MessageBox.Show(this, string.Format(Strings.ResourceDataEditor.DownloadFailedQuestion, i.Text, ex.Message), Application.ProductName, MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error))
+ m_editor.SetLastException(ex);
+ switch (MessageBox.Show(this, string.Format(Strings.ResourceDataEditor.DownloadFailedQuestion, i.Text, ex.Message), Application.ProductName, MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error))
{
case DialogResult.Abort:
RefreshFileList();
@@ -847,6 +848,7 @@
}
catch (Exception ex)
{
+ m_editor.SetLastException(ex);
MessageBox.Show(this, string.Format(Strings.ResourceDataEditor.UpdateXmlDataError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/XmlEditorControl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/XmlEditorControl.cs 2010-02-04 03:25:50 UTC (rev 4585)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/XmlEditorControl.cs 2010-02-04 18:35:34 UTC (rev 4586)
@@ -489,7 +489,9 @@
}
catch (Exception ex)
{
- MessageBox.Show(this, string.Format(Strings.XmlEditorControl.SerializeError, ex.ToString()), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ if (m_editor != null)
+ m_editor.SetLastException(ex);
+ MessageBox.Show(this, string.Format(Strings.XmlEditorControl.SerializeError, ex.ToString()), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
@@ -646,6 +648,8 @@
}
catch (Exception ex)
{
+ if (m_editor != null)
+ m_editor.SetLastException(ex);
EndExternalEditing(false);
MessageBox.Show(this, string.Format(Strings.XmlEditorControl.ExternalEditorError, ex.ToString()), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
More information about the mapguide-commits
mailing list