mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-30 22:14:09 +08:00
Merge pull request #366 from ya1gaurav/patch-30
parseCommandLine also throws
This commit is contained in:
commit
5721f1ca57
@ -310,12 +310,12 @@ static int runTest(Options const& opts)
|
|||||||
}
|
}
|
||||||
int main(int argc, const char* argv[]) {
|
int main(int argc, const char* argv[]) {
|
||||||
Options opts;
|
Options opts;
|
||||||
|
try {
|
||||||
int exitCode = parseCommandLine(argc, argv, &opts);
|
int exitCode = parseCommandLine(argc, argv, &opts);
|
||||||
if (exitCode != 0) {
|
if (exitCode != 0) {
|
||||||
printf("Failed to parse command-line.");
|
printf("Failed to parse command-line.");
|
||||||
return exitCode;
|
return exitCode;
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
return runTest(opts);
|
return runTest(opts);
|
||||||
}
|
}
|
||||||
catch (const std::exception& e) {
|
catch (const std::exception& e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user