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

ErrorGuard::~ErrorGuard should not terminate program #3606

Open
blattms opened this issue Jul 20, 2023 · 2 comments
Open

ErrorGuard::~ErrorGuard should not terminate program #3606

blattms opened this issue Jul 20, 2023 · 2 comments

Comments

@blattms
Copy link
Member

blattms commented Jul 20, 2023

It calls std::exit(1) if there are recorded warnings. Seems a surprising and IMHO unclean. Any particular reason for that?

@bska
Copy link
Member

bska commented Jul 21, 2023

It calls std::exit(1) if there are recorded warnings.

Kind of. The call to exit is if there are recorded errors and their "action" is configured to be EXIT1 or DELAYED_EXIT1. This is supposed to happen only for very serious problems in the input which mean we're unable to continue the run. In an MPI run there should probably be a different mechanism to achieve the same result, but we can't pretend the situation doesn't exist.

@blattms
Copy link
Member Author

blattms commented Jul 21, 2023

I don't think you need MPI to get into an awkward situation. We just need to throw an exception while the ErrorGuard with recorded errors is on the stack and that gets unwinded due to the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants