diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-22 11:50:55 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-22 11:50:55 +0100 |
commit | baf99d32bc58074f10cf194e43963f47fae34c08 (patch) | |
tree | a4e80d11a641054db48c8cb2b075d43f3b399b67 /loader | |
parent | 2da189ce7435d44a83e37963e79ca0eb927f4e23 (diff) |
a
Diffstat (limited to 'loader')
-rw-r--r-- | loader/texture.cpp | 4 | ||||
-rw-r--r-- | loader/wall-atlas.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/loader/texture.cpp b/loader/texture.cpp index ce72a29c..28b903c2 100644 --- a/loader/texture.cpp +++ b/loader/texture.cpp @@ -2,6 +2,7 @@ #include "compat/assert.hpp" #include "compat/exception.hpp" #include "compat/defs.hpp" +#include "compat/strerror.hpp" #include <cstring> #include <cstdio> #include <Corrade/Containers/StringStlView.h> @@ -46,7 +47,8 @@ Trade::ImageData2D loader_impl::texture(StringView prefix, StringView filename_) } const auto path = Path::currentDirectory(); buf[len] = '\0'; - fm_throw("can't open image '{}' (cwd '{}')"_cf, buf, path ? StringView{*path} : "(null)"_s); + char errbuf[128]; + fm_throw("can't open image '{}' (cwd '{}'): {}"_cf, buf, path ? StringView{*path} : "(null)"_s, get_error_string(errbuf)); } } // namespace floormat::loader_detail diff --git a/loader/wall-atlas.cpp b/loader/wall-atlas.cpp index 4ade3fbb..1784f4e2 100644 --- a/loader/wall-atlas.cpp +++ b/loader/wall-atlas.cpp @@ -38,7 +38,7 @@ const wall_info& loader_impl::wall_atlas(StringView name, StringView dir) auto it = wall_atlas_map.find(path); if (it == wall_atlas_map.end()) - fm_throw("no such wall atlas '{}'"_cf, fmt::string_view{path.data(), path.size()}); + fm_throw("no such wall atlas '{}'"_cf, path); fm_assert(it->second != nullptr); if (!it->second->atlas) { |