From 47e74a258fb73c284efb17e1697ea0c6f3cde550 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 11 Jun 2022 12:29:18 +0200 Subject: a --- anim/serialize.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'anim') diff --git a/anim/serialize.cpp b/anim/serialize.cpp index 3aca6201..be29dd28 100644 --- a/anim/serialize.cpp +++ b/anim/serialize.cpp @@ -7,7 +7,6 @@ #include #include -using Corrade::Utility::Debug; using Corrade::Utility::Error; namespace nlohmann { @@ -44,7 +43,7 @@ std::tuple anim::from_json(const std::filesystem::path& pathname) try { s.open(pathname, std::ios_base::in); } catch (const std::ios::failure& e) { - Error{} << "failed to open" << pathname << ':' << e.what(); + Error{Error::Flag::NoSpace} << "failed to open '" << pathname << "':" << e.what(); return { {}, false }; } anim ret; @@ -54,7 +53,7 @@ std::tuple anim::from_json(const std::filesystem::path& pathname) using nlohmann::from_json; from_json(j, ret); } catch (const std::exception& e) { - Error{} << "failed to parse" << pathname << ':' << e.what(); + Error{Error::Flag::NoSpace} << "failed to parse '" << pathname << "':" << e.what(); return { {}, false }; } return { std::move(ret), true }; @@ -69,14 +68,14 @@ bool anim::to_json(const std::filesystem::path& pathname) try { s.open(pathname, std::ios_base::out | std::ios_base::trunc); } catch (const std::ios::failure& e) { - Error{} << "failed to open" << pathname << "for writing:" << e.what(); + Error{Error::Flag::NoSpace} << "failed to open '" << pathname << "' for writing: " << e.what(); return false; } try { s << j.dump(4); s.flush(); } catch (const std::exception& e) { - Error{} << "failed writing" << pathname << ':' << e.what(); + Error{Error::Flag::NoSpace} << "failed writing '" << pathname << "' :" << e.what(); return false; } -- cgit v1.2.3