I18NCommander/I18N Commander/UI WinForms/ExtensionsError.cs

15 lines
402 B
C#

using Processor;
namespace UI_WinForms;
public static class ExtensionsError
{
public static ProcessorResult<TResult> ProcessError<TResult>(this ProcessorResult<TResult> result)
{
if (result.Successful)
return result;
MessageBox.Show(result.ErrorMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return result;
}
}