Log unconsumed input as an error

This commit is contained in:
John Keiser 2020-08-06 13:48:58 -07:00
parent 6bb99aec3c
commit 5ecd17f49e
2 changed files with 1 additions and 7 deletions

View File

@ -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;
}

View File

@ -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) {