Skip to content

Commit d091b5f

Browse files
authored
subscribe to UnhandledException (#68)
1 parent 14c4f52 commit d091b5f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

PrinterApp/App.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public partial class App : Application
2323

2424
private App()
2525
{
26+
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
27+
2628
Thread.CurrentThread.CurrentCulture =
2729
System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
2830
_memoryMonitor.StartTimer();
@@ -50,6 +52,12 @@ private App()
5052
Marketing.LoadProgram();
5153
}
5254

55+
private void CurrentDomainOnUnhandledException(object sender,
56+
UnhandledExceptionEventArgs e)
57+
{
58+
Log.Error((Exception)e.ExceptionObject, "CurrentDomainOnUnhandledException");
59+
}
60+
5361
private void RebootHandler()
5462
{
5563
_printerModel.PrinterViewModel.DownloadNotInProgress = false;

PrinterApp/PrinterApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<Title>PrinterApp</Title>
1212
<Description>gui for work https://app.profcomff.com/print/docs</Description>
1313
<Authors>Dyakov EI</Authors>
14-
<Version>2.1.11.0</Version>
14+
<Version>2.1.11.1</Version>
1515
<Company>dyakov.space</Company>
1616
<Copyright>dyakov.space @ 2023</Copyright>
1717
</PropertyGroup>

0 commit comments

Comments
 (0)