Print error messages to console log
Suggestion: Each time we throw an exception, the error message should be printed to the console log using BOOST_LOG_SEV() or similar.
When client code uses csecorecpp, most calls throw catchable exceptions with a useful error message. Let us however consider a case using csecorec. The client code calls cse_execution_start() and after a while a simulation error occurs. Here we throw an exception in algorithm.cpp, but don't catch it properly in cse.cpp, causing a subsequent deadlock with no hints as to what happened in the console log. While this issue could probably be fixed in cse.cpp, seeing an error appear in the console log would be helpful.
Are there other examples of cases where this would be useful?
It kind of sounds like we have a bug in our existing error reporting channel, and the proposal is to mitigate the bug by introducing a second error reporting channel, rather than fixing it.
See #413. It appears that I posted a bug report complaining of an instance of exactly what is proposed here. ;)
Are there other examples of cases where this would be useful?
Not that I know of.
It kind of sounds like we have a bug in our existing error reporting channel, and the proposal is to mitigate the bug by introducing a second error reporting channel, rather than fixing it.
We do indeed have a bug (I just reported it in a separate issue, see #415). This proposal comes from me supporting/debugging various problems people have been experiencing with the CSE demo app, and is more about making it easier to nail down root causes when higher level error handling is not implemented properly.
See #413. It appears that I posted a bug report complaining of an instance of exactly what is proposed here. ;)
That is a valid complaint! Could a more tolerable option be to print exception messages when in debug mode, or printing with severity debug?