/// <summary> /// Show a messagebox that displays the <see cref="Exception"/>. <see cref="RestException"/>s will be propaply handled. /// </summary> /// <param name="exception">The exception that should be displayed.</param> /// <param name="window">The window the error should be displayed on</param> public static void ShowMessage(this Exception exception, IWindowInteractionService window) { if (exception is RestException restException) { restException.ShowMessage(window); } else { window.ShowErrorMessageBox(Tx.T("ErrorMessages:UnexpectedErrorOccurred", "message", exception.Message)); } }
/// <summary> /// Show a message box that displays the <see cref="RestException"/> /// </summary> /// <param name="exception">The exception that should be displayed</param> /// <param name="window">The window the error should be displayed on</param> public static void ShowMessage(this RestException exception, IWindowInteractionService window) { window.ShowErrorMessageBox(GetRestExceptionMessage(exception)); }