File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,8 +123,11 @@ int main(int argc, char* argv[])
123123 argv[0 ] = exename;
124124#endif
125125
126+ #ifdef NDEBUG
126127 try {
128+ #endif
127129 return exec.check (argc, argv);
130+ #ifdef NDEBUG
128131 } catch (const InternalError& e) {
129132 printf (" %s\n " , e.errorMessage .c_str ());
130133 } catch (const std::exception& error) {
@@ -133,6 +136,7 @@ int main(int argc, char* argv[])
133136 printf (" Unknown exception\n " );
134137 }
135138 return EXIT_FAILURE ;
139+ #endif
136140}
137141
138142
Original file line number Diff line number Diff line change 2323
2424int main (int argc, char *argv[])
2525{
26+ #ifdef NDEBUG
2627 try {
28+ #endif
2729 options args (argc, const_cast <const char **>(argv));
2830
2931 std::size_t failedTestsCount = TestFixture::runTests (args);
3032 return (failedTestsCount == 0 ) ? EXIT_SUCCESS : EXIT_FAILURE ;
33+ #ifdef NDEBUG
3134 } catch (const InternalError& e) {
3235 printf (" %s\n " , e.errorMessage .c_str ());
3336 } catch (const std::exception& error) {
@@ -36,4 +39,5 @@ int main(int argc, char *argv[])
3639 printf (" Unknown exception\n " );
3740 }
3841 return EXIT_FAILURE ;
42+ #endif
3943}
You can’t perform that action at this time.
0 commit comments