/// <summary> /// Notify the user that an error has occurred. /// </summary> /// <param name="title">Error title (used as the error caption).</param> /// <param name="description">Error description (displayed within a scrolling /// text-box so can be longer and/or display diagnostic information).</param> public static void DisplayError(string title, string description) { LogError(String.Format(CultureInfo.CurrentCulture, "{0}: {1}", title, description)); DisplayableException displayableException = new DisplayableException(title, description); using (DisplayableExceptionDisplayForm form = new DisplayableExceptionDisplayForm(displayableException)) form.ShowDialog(Win32WindowImpl.ForegroundWin32Window); }
public static void Show(IWin32Window owner, Exception ex) { using (DisplayableExceptionDisplayForm form = new DisplayableExceptionDisplayForm(ex)) form.ShowDialog(owner); }