Merge pull request #366 from ya1gaurav/patch-30

parseCommandLine also throws
This commit is contained in:
Christopher Dunn 2015-09-22 05:09:33 -05:00
commit 5721f1ca57

View File

@ -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) {