Feature #3394
improve gmxapi error handling
Description
Per feedback in earlier development cycles, the gmxapi Status for operations was largely hidden from gmxapi 0.1, but the exception model and failure modes are still insufficiently defined.
Since we now require relatively modern Python interpreter versions, exception chaining is an attractive way to provide hierarchical information about the causes of failures, as long as exceptions are robustly handled. We probably need to expand the Future interface specification to handle proxied exception handling. We probably also need at least one new exception to capture generic operation failure in the gmxapi.exceptions.Error type hierarchy.
It is also not always clear when an operation should be considered to have failed. As a test case, we can add a "required_exit_code" key word to gmxapi.commandline_operation()
, but recognize that a non-zero exit code from gmxapi.commandline.cli()
is not really inherently exceptional behavior.
Related issues
Associated revisions
History
#1 Updated by Eric Irrgang 11 months ago
- Related to Bug #3376: gmxapi.commandline_operation is not helpful when an invalid executable is provided added
Improve gmxapi C++ test coverage for failed mdrun.
Make sure that we test the C++ API to confirm that non-zero mdrun exit
codes are detected when using SIGINT. No additional test execution is
needed. We just add a little more rigor to an existing test.
Ref #3394