summaryrefslogtreecommitdiffhomepage
path: root/loader
diff options
context:
space:
mode:
Diffstat (limited to 'loader')
-rw-r--r--loader/texture.cpp4
-rw-r--r--loader/wall-atlas.cpp2
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)
{