diff --git a/I18N Commander/UI WinForms/ExtensionsError.cs b/I18N Commander/UI WinForms/ExtensionsError.cs new file mode 100644 index 0000000..0873d09 --- /dev/null +++ b/I18N Commander/UI WinForms/ExtensionsError.cs @@ -0,0 +1,15 @@ +using Processor; + +namespace UI_WinForms; + +public static class ExtensionsError +{ + public static ProcessorResult ProcessError(this ProcessorResult result) + { + if (result.Successful) + return result; + + MessageBox.Show(result.ErrorMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return result; + } +} \ No newline at end of file