Exemplo n.º 1
0
 private static void Save()
 {
     try
     {
         AppData.WriteFile(HistoryFile, JsonConvert.SerializeObject(new SerializableFileHistory(_history.ToArray())));
     }
     catch (Exception e)
     {
         MessageBox.Show("Could not save file history!\nNo changes have been made to the file.");
         Logger.DumpException(e);
     }
 }
Exemplo n.º 2
0
        public static void DumpException(Exception e)
        {
            AppData.Init();
            AppData.CreateDirectory("Traceback");
            DateTime now = DateTime.Now;

            AppData.WriteFile(
                // ReSharper disable once StringLiteralTypo
                "Traceback/" + now.ToString("yyMMdd-HHmmss") + ".txt",
                "=====================================\n" +
                "=== Tabbed Editor Error Traceback ===\n" +
                $"===    {now:dd MMM yyyy    HH:mm:ss}    ===\n" +
                "=====================================\n" +
                $"\n{e.Message}\n" +
                $"{e.StackTrace}"
                );
        }