Example #1
0
 private void LogUnhandledException(Exception exception, string @event)
 {
     HSTLogger.Data("Unhandled Exception Catcher", "Next log entry will have exception and atEvent.");
     //HSTLogger.Data(exception.ToString(), @event);
     LogInnerExceptionMessages(exception, @event);
     HSTLogger.Flush();
 }
Example #2
0
 private void LogInnerExceptionMessages(Exception e, string title)
 {
     if (e.InnerException != null)
     {
         LogInnerExceptionMessages(e.InnerException, title);
     }
     HSTLogger.Data(title, e.Message);
 }
Example #3
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     if (LogicBroker.BackUpDatabase())
     {
         HSTLogger.Data("App Exit", "Backup of files complete.");
     }
     else
     {
         HSTLogger.Data("App Exit", "Unable to backup to file system.");
         MessageBox.Show("Backup failed.", "Information", MessageBoxButton.OK, MessageBoxImage.Information);
     }
     HSTLogger.Flush();
 }