示例#1
0
 public static void ShowError(string errorText, Exception ex)
 {
     ExceptionForm form = new ExceptionForm(errorText, ex);
     //form.MdiParent = MainForm.ActiveForm.ParentForm;
     form.ShowDialog();
     LogError(errorText, ex);
 }
示例#2
0
 private void testExceptionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try {
         StreamReader reader = new StreamReader("D:\test.xml");
         reader.ReadToEnd();
     } catch (Exception ex) {
         FrontendUtils.ShowError(ex.Message, ex);
         FrontendUtils.ShowError("wow", null);
         ExceptionForm form = new ExceptionForm("Sample exception!!", ex);
         form.Show();
     }
 }