extracted base class for dialogs with error message