BSON: Improved documentation and error handling/reporting

This commit is contained in:
Julian Becker 2018-10-07 07:52:12 +02:00
parent e8730e5e82
commit 81f4b34e06
6 changed files with 421 additions and 120 deletions

View file

@ -868,7 +868,7 @@ class binary_writer
switch (j.type())
{
default:
JSON_THROW(type_error::create(317, "JSON value cannot be serialized to requested format"));
JSON_THROW(type_error::create(317, "JSON value of type " + std::to_string(static_cast<std::uint8_t>(j.type())) + " cannot be serialized to requested format"));
break;
case value_t::discarded:
break;