Skip to content

Commit

Permalink
Revise FailedToOpenFileError (#7305)
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 authored Sep 17, 2024
1 parent 724cce7 commit 0e1e873
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/engine/assets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
#include <SDL.h>
#include <expected.hpp>

#include <fmt/format.h>

#include "appfat.h"
#include "diablo.h"
#include "mpq/mpq_reader.hpp"
#include "utils/file_util.h"
#include "utils/language.h"
#include "utils/str_cat.hpp"
#include "utils/string_or_view.hpp"

Expand Down Expand Up @@ -220,7 +223,7 @@ struct AssetHandle {

[[noreturn]] inline void FailedToOpenFileError(std::string_view path, std::string_view error)
{
app_fatal(StrCat("Failed to open file:\n", path, "\n\n", error));
app_fatal(fmt::format(fmt::runtime(_("Failed to open file:\n{:s}\n\n{:s}\n\nThe MPQ file(s) might be damaged. Please check the file integrity.")), path, error));
}

inline bool ValidatAssetRef(std::string_view path, const AssetRef &ref)
Expand Down

0 comments on commit 0e1e873

Please sign in to comment.