We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d93d7b4 commit 3c482c4Copy full SHA for 3c482c4
2 files changed
src/crypto/cbor.h
@@ -88,7 +88,7 @@ namespace ccf::cbor
88
{
89
if (!msg.empty())
90
91
- throw CBORDecodeError(fmt::format("{}: {}", err.what(), msg));
+ throw CBORDecodeError(fmt::format("{}: {}", msg, err.what()));
92
}
93
throw err;
94
src/crypto/test/cbor.cpp
@@ -1454,7 +1454,7 @@ TEST_CASE("CBOR: throw with context")
1454
1455
const std::string context = "Custom enough context";
1456
const std::string err = "Not a string value";
1457
- const std::string expected_err = err + ": " + context;
+ const std::string expected_err = context + ": " + err;
1458
REQUIRE_THROWS_WITH_AS(
1459
rethrow_with_msg([&]() { std::ignore = v->as_string(); }, context),
1460
expected_err.c_str(),
0 commit comments