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
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 unhelpfulFileNotFoundError
.This PR wraps all calls to
subprocess.run()
in a helper function which