File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ namespace ccf::cbor
8888 {
8989 if (!msg.empty ())
9090 {
91- throw CBORDecodeError (fmt::format (" {}: {}" , err.what (), msg ));
91+ throw CBORDecodeError (fmt::format (" {}: {}" , msg, err.what ()));
9292 }
9393 throw err;
9494 }
Original file line number Diff line number Diff line change @@ -1454,7 +1454,7 @@ TEST_CASE("CBOR: throw with context")
14541454
14551455 const std::string context = " Custom enough context" ;
14561456 const std::string err = " Not a string value" ;
1457- const std::string expected_err = err + " : " + context ;
1457+ const std::string expected_err = context + " : " + err ;
14581458 REQUIRE_THROWS_WITH_AS (
14591459 rethrow_with_msg ([&]() { std::ignore = v->as_string (); }, context),
14601460 expected_err.c_str (),
You can’t perform that action at this time.
0 commit comments