Log unconsumed input as an error
This commit is contained in:
parent
6bb99aec3c
commit
5ecd17f49e
|
@ -204,7 +204,7 @@ document_end:
|
|||
|
||||
// If we didn't make it to the end, it's an error
|
||||
if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) {
|
||||
logger::log_string("More than one JSON value at the root of the document, or extra characters at the end of the JSON!");
|
||||
log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!");
|
||||
return TAPE_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,12 +33,6 @@ namespace logger {
|
|||
}
|
||||
}
|
||||
|
||||
static simdjson_really_inline void log_string(const char *message) {
|
||||
if (LOG_ENABLED) {
|
||||
printf("%s\n", message);
|
||||
}
|
||||
}
|
||||
|
||||
// Logs a single line of
|
||||
template<typename S>
|
||||
static simdjson_really_inline void log_line(S &structurals, const char *title_prefix, const char *title, const char *detail) {
|
||||
|
|
Loading…
Reference in New Issue