TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ exception_message()

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
std::string nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message ( const input_format_t  format,
const std::string &  detail,
const std::string &  context 
) const
inlineprivate
Parameters
[in]formatthe current format
[in]detaila detailed error message
[in]contextfurther context information
Returns
a message string to use in the parse_error exceptions

Definition at line 10941 of file json.hpp.

10944 {
10945 std::string error_msg = "syntax error while parsing ";
10946
10947 switch (format)
10948 {
10949 case input_format_t::cbor:
10950 error_msg += "CBOR";
10951 break;
10952
10953 case input_format_t::msgpack:
10954 error_msg += "MessagePack";
10955 break;
10956
10957 case input_format_t::ubjson:
10958 error_msg += "UBJSON";
10959 break;
10960
10961 case input_format_t::bson:
10962 error_msg += "BSON";
10963 break;
10964
10965 case input_format_t::json: // LCOV_EXCL_LINE
10966 default: // LCOV_EXCL_LINE
10967 JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE
10968 }
10969
10970 return error_msg + " " + context + ": " + detail;
10971 }