Add InitError(error, details) overload

This is only used in the current PR to avoid ugly
`strprintf(Untranslated("%s:\n%s"), str, MakeUnorderedList(details)`
boilerplate in init code. But in the future the function could be extended and
more widely used to include more details in GUI error messages or display them
in a more readable way, see code comment.
This commit is contained in:
Ryan Ofsky
2023-02-24 13:44:07 -05:00
parent 3db2874bd7
commit d172b5c671
4 changed files with 16 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ void InitWarning(const bilingual_str& str);
/** Show error message **/
bool InitError(const bilingual_str& str);
constexpr auto AbortError = InitError;
bool InitError(const bilingual_str& str, const std::vector<std::string>& details);
extern CClientUIInterface uiInterface;