Issue 43: add exception catching code only for non-debug builds
The intent for the code added for issue #43 (closed) was, that if an error while running BornAgain occured, to make it more apparent to the user. As it turned out, this resulted in a drawback for the developers: if BornAgain is run in a debugger and an exception is thrown and subsequently displayed in the message box, the program stops at piece of code, where the whole information, where the exception was thrown (call stack) is not there anymore.
To improve the situation, this MR contains code which only adds the exception catching code for non-debug builds. I.e. in release builds, if an exception is thrown, a message box will be presented to the user (as before) and in debug builds, the exception will not be caught and can be analysed in the debugger just like before the implementation of issue 43.
Merge request reports
Activity
requested review from @m.puchner
assigned to @m.puchner
I tried
CMAKE_BUILD_TYPE
at first but then I learned that this only works for what is called "single-configuration" builds (like the Linux build which uses Makefiles) with cmake. For "multi-configuration" builds (e.g. if using Visual Studio, but other IDEs too) the variableCMAKE_BUILD_TYPE
is not set at all and the user selects the type of build in the IDE itself (and without cmake being rerun). Because of this, the business is a bit tricky, but it seems to work.assigned to @t.knopff and unassigned @m.puchner
added 18 commits
-
7cf20a0a...4ed119f3 - 17 commits from branch
develop
- 4a375d5d - Add exception catching code only for non-debug builds
-
7cf20a0a...4ed119f3 - 17 commits from branch
mentioned in commit aaa822f7