diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-08-12 23:45:47 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-08-12 23:45:47 +0300 |
| commit | 30f5a25d16b65c267c2658861c50b50c39877bc4 (patch) | |
| tree | 19e1beed32b3d612c26f025724c5adf72039f9a0 /Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs | |
| parent | 9149538fdf00ab97647b36fed3282f2037da4b2d (diff) | |
| download | Tango-30f5a25d16b65c267c2658861c50b50c39877bc4.tar.gz Tango-30f5a25d16b65c267c2658861c50b50c39877bc4.zip | |
Implemented global exception trapper GetLastApplicationCrashFromWindows for PPC/FSE/MS.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs index 654a440ca..7d8304209 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs @@ -39,6 +39,8 @@ namespace Tango.PPC.UI /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs" /> that contains the event data.</param> protected override void OnStartup(StartupEventArgs e) { + //throw new InvalidOperationException("This is a fake exception!!!"); + //removed due to possibly causing this issue: //https://stackoverflow.com/questions/41543956/how-to-debug-not-enough-storage-is-available-to-process-this-command //ThreadPool.SetMaxThreads(1000, 1000); @@ -64,6 +66,7 @@ namespace Tango.PPC.UI } LogManager.Log("Application Started..."); + LogManager.Log($"Application Version: '{AssemblyHelper.GetCurrentAssemblyVersion()}'."); base.OnStartup(e); @@ -79,10 +82,21 @@ namespace Tango.PPC.UI }; WebRequest.DefaultWebProxy = null; + + GetLastApplicationCrashFromWindows(); } #region Global Exception Trapping + private async void GetLastApplicationCrashFromWindows() + { + var logItem = await exceptionTrapper.GetLastApplicationCrashEventLog(); + if (logItem != null) + { + LogManager.Log(logItem); + } + } + /// <summary> /// Handles the ApplicationCrashed event of the ExceptionTrapper. /// </summary> |
