Esempio n. 1
0
 void TaskManager_UnobservedTaskException(FluentScheduler.Model.TaskExceptionInformation sender, UnhandledExceptionEventArgs e)
 {
     if (e.IsTerminating)
     {
         _log.FatalException("There was a fatal exception running a scheduled task.", e.ExceptionObject as Exception);
     }
     else
     {
         _log.ErrorException("There was an exception running a scheduled task.", e.ExceptionObject as Exception);
     }
 }
Esempio n. 2
0
 void TaskManager_UnobservedTaskException(FluentScheduler.Model.TaskExceptionInformation sender, System.UnhandledExceptionEventArgs e)
 {
     EventLog.WriteEntry("FluentScheduler",
                         string.Format("Ocorreu uma excessão não tratada. \n  Tarefa {0}\n    Exception: {1}",
                                       sender.Name, (e.ExceptionObject as Exception).ToString()), EventLogEntryType.Error);
 }