Skip to content

Commit 6c14548

Browse files
committed
parseCommandLine also throws
Catching exceptions thrown by parseCommandLine (std::bad_alloc & std::length_error) also.
1 parent cc5cdb5 commit 6c14548

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jsontestrunner/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@ static int runTest(Options const& opts)
310310
}
311311
int main(int argc, const char* argv[]) {
312312
Options opts;
313+
try {
313314
int exitCode = parseCommandLine(argc, argv, &opts);
314315
if (exitCode != 0) {
315316
printf("Failed to parse command-line.");
316317
return exitCode;
317318
}
318-
try {
319319
return runTest(opts);
320320
}
321321
catch (const std::exception& e) {

0 commit comments

Comments
 (0)