mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-28 20:15:24 +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[]) {
|
||||
Options opts;
|
||||
try {
|
||||
int exitCode = parseCommandLine(argc, argv, &opts);
|
||||
if (exitCode != 0) {
|
||||
printf("Failed to parse command-line.");
|
||||
return exitCode;
|
||||
}
|
||||
try {
|
||||
return runTest(opts);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user