File tree Expand file tree Collapse file tree 1 file changed +18
-12
lines changed Expand file tree Collapse file tree 1 file changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ mrdocs_main(int argc, char const** argv)
153153 return EXIT_SUCCESS;
154154}
155155
156+ #ifdef _NDEBUG
156157static
157158void
158159reportUnhandledException (
@@ -163,24 +164,29 @@ reportUnhandledException(
163164 report::fatal (" Unhandled exception: {}\n " , ex.what ());
164165 sys::PrintStackTrace (llvm::errs ());
165166}
167+ #endif
166168
167169} // clang::mrdocs
168170
169171int
170172main (int argc, char const ** argv)
171173{
172- // try
173- // {
174+ #ifndef _NDEBUG
175+ return clang::mrdocs::mrdocs_main (argc, argv);
176+ #else
177+ try
178+ {
174179 return clang::mrdocs::mrdocs_main (argc, argv);
175- // }
176- // catch(clang::mrdocs::Exception const& ex)
177- // {
180+ }
181+ catch (clang::mrdocs::Exception const & ex)
182+ {
178183 // Thrown Exception should never get here.
179- // clang::mrdocs::reportUnhandledException(ex);
180- // }
181- // catch(std::exception const& ex)
182- // {
183- // clang::mrdocs::reportUnhandledException(ex);
184- // }
185- // return EXIT_FAILURE;
184+ clang::mrdocs::reportUnhandledException (ex);
185+ }
186+ catch (std::exception const & ex)
187+ {
188+ clang::mrdocs::reportUnhandledException (ex);
189+ }
190+ return EXIT_FAILURE;
191+ #endif
186192}
You can’t perform that action at this time.
0 commit comments