Esempio n. 1
0
        public static void WriteByParallelTaskContext(Exception ex, DataSource dataSource, string customMessage = null)
        {
            try
            {
                if (!String.IsNullOrWhiteSpace(customMessage))
                {
                    ex = new Exception(customMessage, ex);
                }

                NotifyViaMail(ex);

                WriteByParallelTaskContext(LogEntryType.Error, dataSource, ExceptionFormatter.Format(ex));
            }
            catch (Exception thrownException)
            {
                WriteExceptionToLog(thrownException);
            }
        }
Esempio n. 2
0
        public static void WriteExceptionToLog(Integration integration, DataSource dataSource, JobInstance jobInstance, JobStepInstance jobStepInstance, Exception ex, string customMessage = null)
        {
            if (!String.IsNullOrWhiteSpace(customMessage))
            {
                ex = new Exception(customMessage, ex);
            }

            NotifyViaMail(ex);

            WriteToLog(LogEntryType.Error, integration, dataSource, jobInstance, jobStepInstance, () => { return(ExceptionFormatter.Format(ex)); });
        }