static void RunDebt() { try { var s = new Schedule(); s.RunDebtSms(); } catch (Exception ex) { ExceptionLogHelper.Write(ex); } return; }
/// <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); }
/// <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); }