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

Helpful error detection from sub-processes #58

Merged
merged 2 commits into from
Aug 12, 2024
Merged

Conversation

dennisbrookner
Copy link
Collaborator

Currently, the program behavior when a subprocess (CCP4 or phenix process called from the command line) fails is very unhelpful. If verbose mode is off, the subprocess will fail silently. The main program will then error out with a FileNotFoundError that is not necessarily informative to a user. If verbose mode is on, the subprocess error message will be printed, but the latest error presented will still be the unhelpful FileNotFoundError.

This PR wraps all calls to subprocess.run() in a helper function which

  • detects if the subprocess errors out, and if so, halts the program with an error
  • instructs the user to re-run in verbose mode (if they aren't already) to get more information

@dennisbrookner dennisbrookner linked an issue Aug 9, 2024 that may be closed by this pull request
@dennisbrookner dennisbrookner merged commit e7753cf into main Aug 12, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

Detect when phenix or ccp4 fails and raise an error
1 participant