♿ improved error messages for binary formats #1288

This commit is the equivalent of #1282 for CBOR, MessagePack, and UBJSON.
This commit is contained in:
Niels Lohmann committed 2018-10-17 12:15:58 +02:00
1 parent dd672939a0
commit dbb0b63187
7 files changed
+364 -282

No files matched your search

@@ -767,7 +767,7 @@ class binary_writer
}
else
{
JSON_THROW(out_of_range::create(407, "number overflow serializing " + std::to_string(n)));
JSON_THROW(out_of_range::create(407, "integer number " + std::to_string(n) + " cannot be represented by UBJSON as it does not fit int64"));
}
}
@@ -821,7 +821,7 @@ class binary_writer
// LCOV_EXCL_START
else
{
JSON_THROW(out_of_range::create(407, "number overflow serializing " + std::to_string(n)));
JSON_THROW(out_of_range::create(407, "integer number " + std::to_string(n) + " cannot be represented by UBJSON as it does not fit int64"));
}
// LCOV_EXCL_STOP
}