mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-26 02:00:50 +08:00
Update readFromString.cpp (#1477)
Print the error to screen Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
This commit is contained in:
parent
31754ce2e2
commit
742c645ab3
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user