WikiFunctions.ErrorHandler.HandleException C# (CSharp) Method

HandleException() public static method

Displays exception information. Should be called from try...catch handlers
public static HandleException ( Exception ex ) : void
ex System.Exception Exception object to handle
return void
        public static void HandleException(Exception ex)
        {
            if (ex == null || HandleKnownExceptions(ex)) return;

            // TODO: suggest a bug report for other exceptions
            ErrorHandler handler = new ErrorHandler {txtError = {Text = ex.Message}};

            var errorMessage = new BugReport(ex).PrintForPhabricator();
            handler.txtDetails.Text = errorMessage;

            handler.txtSubject.Text = ex.GetType().Name + " in " + Thrower(ex);

            Tools.WriteDebug("HandleException", errorMessage);
            handler.ShowDialog();
        }