internal static void WebMiniDumpHandler(Exception ex) { try { DumpData dump = new DumpData(); dump.AddException(ex); dump.AddFile(Path.Combine(Application.StartupPath, "settings", "default.xml")); dump.AddFile(Path.Combine(Application.StartupPath, "chummerlog.txt")); Process crashHandler = Process.Start("crashhandler", "crash " + dump.SerializeBase64()); crashHandler.WaitForExit(); } catch (Exception nex) { MessageBox.Show("Failed to create crash report.\nHere is some information to help the developers figure out why\n" + nex + "\nCrash information:\n" + ex); } }
internal static void WebMiniDumpHandler(Exception ex) { if (MessageBox.Show("Chummer5a crashed.\nDo you want to send a crash report to the developer?", "Crash!", MessageBoxButtons.YesNo) == DialogResult.Yes) { try { DumpData dump = new DumpData(); dump.AddException(ex); dump.AddFile(Path.Combine(Environment.CurrentDirectory, "settings", "default.xml")); dump.AddFile(Path.Combine(Environment.CurrentDirectory, "chummerlog.txt")); Process crashHandler = Process.Start("crashhandler", "crash " + dump.SerializeBase64()); crashHandler.WaitForExit(); } catch (Exception nex) { MessageBox.Show("Failed to create crash report.\nHere is some information to help the developers figure out why\n" + nex + "\nCrash information:\n" + ex); } } }
internal static void WebMiniDumpHandler(Exception ex) { if (true || MessageBox.Show("Chummer5a crashed.\nDo you want to send a crash report to the developer?", "Crash!", MessageBoxButtons.YesNo) == DialogResult.Yes) { try { DumpData dump = new DumpData(); dump.AddException(ex); dump.AddFile(Path.Combine(Environment.CurrentDirectory, "settings", "default.xml")); dump.AddFile(Path.Combine(Environment.CurrentDirectory, "chummerlog.txt")); Process crashHandler = Process.Start("crashhandler", "crash " + dump.SerializeBase64()); crashHandler.WaitForExit(); } catch { MessageBox.Show("Failed to create crash report.\nMake sure your system is connected to the internet."); } } }
public static void WebMiniDumpHandler(Exception ex) { try { DumpData dump = new DumpData(); dump.AddException(ex); dump.AddFile(Path.Combine(Application.StartupPath, "settings", "default.xml")); dump.AddFile(Path.Combine(Application.StartupPath, "chummerlog.txt")); byte[] info = new UTF8Encoding(true).GetBytes(dump.SerializeBase64()); File.WriteAllBytes(Path.Combine(Application.StartupPath, "json.txt"), info); //Process crashHandler = Process.Start("crashhandler", "crash " + Path.Combine(Application.StartupPath, "json.txt") + " --debug"); Process crashHandler = Process.Start("crashhandler", "crash " + Path.Combine(Application.StartupPath, "json.txt")); crashHandler?.WaitForExit(); } catch (Exception nex) { MessageBox.Show("Failed to create crash report.\nHere is some information to help the developers figure out why\n" + nex + "\nCrash information:\n" + ex); } }