Exemple #1
0
 public static void WriteSeparator(string title = "", char sep = '*')
 {
     if (string.IsNullOrEmpty(title))
     {
         int c = (80 - title.Length - 6) / 2;
         Ionsole.WriteLine(new string(sep, c) + " " + title + new string(sep, c));
     }
     Ionsole.WriteLine(new string(sep, 80));
 }
Exemple #2
0
        private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            if (@internal)
            {
                return;
            }
            @internal = true;

            try
            {
                WriteSeparator();
                Ionsole.WriteLine("UnHandled Exception");
                Ionsole.WriteLine("Exception Object : " + e.ExceptionObject?.ToString());
                Ionsole.WriteLine("Exception IsTerminate : " + e.IsTerminating.ToString());
                WriteSeparator();
            }
            catch { }
            @internal = false;
        }