Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print error messages to console log #412

Open
eidekrist opened this issue Oct 8, 2019 · 3 comments
Open

Print error messages to console log #412

eidekrist opened this issue Oct 8, 2019 · 3 comments
Labels
discussion needed Let's have a discussion about this enhancement New feature or request

Comments

@eidekrist
Copy link
Member

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.

@eidekrist eidekrist added enhancement New feature or request discussion needed Let's have a discussion about this labels Oct 8, 2019
@kyllingstad
Copy link
Member

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.

@kyllingstad
Copy link
Member

See #413. It appears that I posted a bug report complaining of an instance of exactly what is proposed here. ;)

@eidekrist
Copy link
Member Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed Let's have a discussion about this enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants