mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-03-03 04:38:40 +01:00
Include exception details when parsing fails in external_schema example
This commit is contained in:
parent
e21b31295f
commit
4f4f9cf81b
@ -54,8 +54,8 @@ int main(int argc, char *argv[])
|
|||||||
RapidJsonAdapter schemaDocumentAdapter(schemaDocument);
|
RapidJsonAdapter schemaDocumentAdapter(schemaDocument);
|
||||||
try {
|
try {
|
||||||
parser.populateSchema(schemaDocumentAdapter, schema);
|
parser.populateSchema(schemaDocumentAdapter, schema);
|
||||||
} catch (...) {
|
} catch (std::exception &e) {
|
||||||
cerr << "Failed to parse schema." << endl;
|
cerr << "Failed to parse schema: " << e.what() << endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user