From 6c145482937fea5224aabc35142068a5312e75e7 Mon Sep 17 00:00:00 2001 From: Gaurav Date: Tue, 22 Sep 2015 13:53:19 +0530 Subject: [PATCH] parseCommandLine also throws Catching exceptions thrown by parseCommandLine (std::bad_alloc & std::length_error) also. --- src/jsontestrunner/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsontestrunner/main.cpp b/src/jsontestrunner/main.cpp index 1ec1fb6..c8bbd0d 100644 --- a/src/jsontestrunner/main.cpp +++ b/src/jsontestrunner/main.cpp @@ -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) {