TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ unexpect_eof()

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof ( const input_format_t  format,
const char *  context 
) const
inlineprivate
Parameters
[in]formatthe current format (for diagnostics)
[in]contextfurther context information (for diagnostics)
Returns
whether the last read character is not EOF

Definition at line 10914 of file json.hpp.

10915 {
10916 if (JSON_HEDLEY_UNLIKELY(current == std::char_traits<char_type>::eof()))
10917 {
10918 return sax->parse_error(chars_read, "<end of file>",
10919 parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context), BasicJsonType()));
10920 }
10921
10922 return true;
10923 }
std::string exception_message(const input_format_t format, const std::string &detail, const std::string &context) const
Definition: json.hpp:10941
std::size_t chars_read
the number of characters read
Definition: json.hpp:10981
char_int_type current
the current character
Definition: json.hpp:10978
json_sax_t * sax
the SAX parser
Definition: json.hpp:10987
static parse_error create(int id_, const position_t &pos, const std::string &what_arg, const BasicJsonType &context)
create a parse error exception
Definition: json.hpp:2800