private static void HandleException(Exception ex) { if (_application != null) { _application.UnhandledErrorHandler(ex); } else { MessageBox.Show("An unexpected error occurred trying to start up the AGS Editor. Please consult the details below and post the error to the AGS Technical Forum.\n\n" + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }
private static void HandleException(Exception ex) { if (_application != null) { _application.UnhandledErrorHandler(ex); } else { string error = ex.Message; try { error = ex.ToString(); } catch (SEHException sehException) { error = string.Format("\nStack Trace SEHException: HResult Error Code: {0}, Exception: {1}", sehException.ErrorCode, error); } MessageBox.Show("An unexpected error occurred trying to start up the AGS Editor. Please consult the details below and post the error to the AGS Technical Forum.\n\n" + error, "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }