private void bugReportToolStripMenuItem_Click(object sender, EventArgs e) { try { using (var bugform = new BugReportForm(Error)) { var result = bugform.ShowDialog(); if (result == DialogResult.OK) { } } } catch (Exception err) { errorLog(System.Reflection.MethodBase.GetCurrentMethod().Name, err); } }
public void errorLog(String Class, Exception ErrorMsg) { try { Error = Error.AddItemToArray(DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss") + " [" + Class + "] " + ErrorMsg.Message); } catch (Exception e) { Console.Write(e.Message); } try { using (var bugform = new BugReportForm(Error)) { var result = bugform.ShowDialog(); if (result == DialogResult.OK) { } } } catch (Exception err) { errorLog(System.Reflection.MethodBase.GetCurrentMethod().Name, err); } }