Example #1
0
 static void RunDebt()
 {
     try
     {
         var s = new Schedule();
         s.RunDebtSms();
     }
     catch (Exception ex)
     {
         ExceptionLogHelper.Write(ex);
     }
     return;
 }
Example #2
0
        /// <summary>
        /// Save exception
        /// </summary>
        /// <param name="ex"></param>
        /// <param name="fileName"></param>
        protected virtual void LogException(Exception ex, string fileName = null)
        {
            if (IsWriteLine)
            {
                Console.WriteLine();
                var foregroundColor = Console.ForegroundColor;
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex.ToString());
                Console.ForegroundColor = foregroundColor;
                Console.WriteLine();
            }

            ExceptionLogHelper.Write(ex, fileName);
        }
Example #3
0
 /// <summary>
 /// Save exception
 /// </summary>
 /// <param name="ex"></param>
 /// <param name="fileName"></param>
 public virtual void LogException(Exception ex, string fileName = null)
 {
     ExceptionLogHelper.Write(ex, fileName);
 }