openff.bespokefit.executor.utilities.handle_common_errors

openff.bespokefit.executor.utilities.handle_common_errors(console: rich.Console)[source]

A convenience context manager that will capture common internal errors raised by a bespoke executor and print a useful error message to the console rather than a garbled traceback.

The return value of the context manager can be queried to see if an error did actually occur.

Parameters

console – The rich console to print to.

Returns

A dictionary with keys of [has_errored, ].