Update readFromString.cpp (#1477)

Print the error to screen

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
This commit is contained in:
Kapandaria 2024-09-10 04:51:35 +03:00 committed by GitHub
parent 31754ce2e2
commit 742c645ab3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,7 @@ int main() {
const std::unique_ptr<Json::CharReader> reader(builder.newCharReader()); const std::unique_ptr<Json::CharReader> reader(builder.newCharReader());
if (!reader->parse(rawJson.c_str(), rawJson.c_str() + rawJsonLength, &root, if (!reader->parse(rawJson.c_str(), rawJson.c_str() + rawJsonLength, &root,
&err)) { &err)) {
std::cout << "error" << std::endl; std::cout << "error: " << err << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
} }