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

BUG: Return failure exit code if exception raised during scripted module cleanup #1157

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Jun 20, 2019

No description provided.

@jcfr jcfr requested a review from lassoan June 20, 2019 20:34
@jcfr jcfr force-pushed the return-failure-exit-code-if-exception-during-module-cleanup branch from f26980a to d87b9e0 Compare June 20, 2019 20:44
@jcfr jcfr force-pushed the return-failure-exit-code-if-exception-during-module-cleanup branch from d87b9e0 to 7357a3b Compare June 20, 2019 21:35
@lassoan
Copy link
Contributor

lassoan commented Jun 20, 2019

For testing it is good that we capture errors in module destruction. However, in production code, it could be bad if the return code is overwritten if any module shuts down incorrectly. Maybe we should only do it if Slicer runs in --testing mode?

@jcfr
Copy link
Member Author

jcfr commented Jun 20, 2019

Maybe we should only do it if Slicer runs in --testing mode?

Agreed. Thanks for the review.

I will update qSlicerCoreApplication::onAboutToQuit to override the return code only if testing mode is enabled and add an other test case to verify the behavior.

@jcfr
Copy link
Member Author

jcfr commented Jun 20, 2019

Closing. Integrated in r28319 and r28320

@jcfr jcfr closed this Jun 20, 2019
@jcfr jcfr deleted the return-failure-exit-code-if-exception-during-module-cleanup branch June 20, 2019 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants