diff options
Diffstat (limited to 'loader/texture.cpp')
-rw-r--r-- | loader/texture.cpp | 4 |
1 files changed, 3 insertions, 1 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 |