From 91daa79a534d0ce2af014155732736c3983ff5b4 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 20 Nov 2019 20:04:42 +0000 Subject: [PATCH] case 3717 --- source/Plugins/AyaNova.Plugin.QBI/Map.cs | 26 ++++++++++++------- .../Properties/AssemblyInfo.cs | 2 +- source/Plugins/AyaNova.Plugin.QBI/QBI.cs | 2 +- source/Plugins/AyaNova.Plugin.QBI/Util.cs | 11 ++++++++ 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.QBI/Map.cs b/source/Plugins/AyaNova.Plugin.QBI/Map.cs index 4abab63..4d55161 100644 --- a/source/Plugins/AyaNova.Plugin.QBI/Map.cs +++ b/source/Plugins/AyaNova.Plugin.QBI/Map.cs @@ -1552,6 +1552,7 @@ namespace AyaNova.PlugIn.QBI } + CopyableMessageBox cb=new CopyableMessageBox(sb.ToString()); cb.ShowDialog(); @@ -1561,8 +1562,9 @@ namespace AyaNova.PlugIn.QBI catch(Exception ex) { w.Visible=false; - CopyableMessageBox cb=new CopyableMessageBox("ImportToAyaNova error: " + ex.Message); - cb.ShowDialog(); + Util.CrackDisplayAndIntegrationLogException(ex, "QBI:Map:ImportToAyaNova");//case 3717 + //CopyableMessageBox cb = new CopyableMessageBox("ImportToAyaNova error: \r\n" + Util.CrackException(ex)); + //cb.ShowDialog(); } finally @@ -1667,9 +1669,10 @@ namespace AyaNova.PlugIn.QBI catch(Exception ex) { - CopyableMessageBox cb=new CopyableMessageBox("ImportToQuickBooks error: " + ex.Message); - cb.ShowDialog(); - cb.Dispose(); + //CopyableMessageBox cb=new CopyableMessageBox("ImportToQuickBooks error: " + ex.Message); + //cb.ShowDialog(); + //cb.Dispose(); + Util.CrackDisplayAndIntegrationLogException(ex, "QBI:Map:ImportToQuickBooks");//case 3717 } finally { @@ -1868,8 +1871,12 @@ namespace AyaNova.PlugIn.QBI catch(Exception ex) { w.Visible=false; - CopyableMessageBox cb=new CopyableMessageBox("ImportToAyaNova error: " + ex.Message); - cb.ShowDialog(); + + //CopyableMessageBox cb=new CopyableMessageBox("AutoLink error: \r\n" + Util.CrackException(ex)); + //cb.ShowDialog(); + Util.CrackDisplayAndIntegrationLogException(ex, "QBI:Map:AutoLink");//case 3717 + + } finally { @@ -1947,8 +1954,9 @@ namespace AyaNova.PlugIn.QBI catch (Exception ex) { w.Visible = false; - CopyableMessageBox cb = new CopyableMessageBox("UpdateAyaNovaPartPrices error: " + ex.Message); - cb.ShowDialog(); + //CopyableMessageBox cb = new CopyableMessageBox("UpdateAyaNovaPartPrices error: " + ex.Message); + //cb.ShowDialog(); + Util.CrackDisplayAndIntegrationLogException(ex, "QBI:Map:UpdateAyaNovaPartPrices");//case 3717 } finally { diff --git a/source/Plugins/AyaNova.Plugin.QBI/Properties/AssemblyInfo.cs b/source/Plugins/AyaNova.Plugin.QBI/Properties/AssemblyInfo.cs index 1188166..2f1e13d 100644 --- a/source/Plugins/AyaNova.Plugin.QBI/Properties/AssemblyInfo.cs +++ b/source/Plugins/AyaNova.Plugin.QBI/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("7.6.0.0")] -[assembly: AssemblyFileVersion("7.6.0.0")] +[assembly: AssemblyFileVersion("7.6.1.0")] diff --git a/source/Plugins/AyaNova.Plugin.QBI/QBI.cs b/source/Plugins/AyaNova.Plugin.QBI/QBI.cs index 1e55090..256f12f 100644 --- a/source/Plugins/AyaNova.Plugin.QBI/QBI.cs +++ b/source/Plugins/AyaNova.Plugin.QBI/QBI.cs @@ -52,7 +52,7 @@ namespace AyaNova.PlugIn.QBI public string PluginVersion { - get { return "7.6"; }//if patch then 7.3 (patch 1) etc + get { return "7.6 (patch 1)"; }//if patch then 7.3 (patch 1) etc } public string About diff --git a/source/Plugins/AyaNova.Plugin.QBI/Util.cs b/source/Plugins/AyaNova.Plugin.QBI/Util.cs index 7c99207..4ce6288 100644 --- a/source/Plugins/AyaNova.Plugin.QBI/Util.cs +++ b/source/Plugins/AyaNova.Plugin.QBI/Util.cs @@ -6015,6 +6015,17 @@ namespace AyaNova.PlugIn.QBI } + //case 3717 + public static void CrackDisplayAndIntegrationLogException(Exception ex, string methodText="n/a", string extraText="n/a" ) { + + string message="Exception error\r\nMethod: " + methodText + "\r\nExtra: " + extraText + "\r\n Error:" + CrackException(ex); + //Log it so we have it forever in the log + IntegrationLog.Log(QBID, message); + //display it to the user + CopyableMessageBox cb = new CopyableMessageBox(message); + cb.ShowDialog(); + } + /// /// Case 262 addition