openff-toolkit
openff-toolkit copied to clipboard
Make the failure case of ToolkitRegistry.call more useful
Right now, ToolkitRegistry.call tries the requested method in each of its wrapped toolkits and if they all fail, it raises a ValueError that squishes together the messages in each exception:
https://github.com/openforcefield/openff-toolkit/blob/7a3fad5239bcdb940fec8b28a4d4d27235f0738e/openff/toolkit/utils/toolkit_registry.py#L376-L380
A small improvement would involve raising a custom exception instead of ValueError, using mostly the same message.
cc: @j-wags who can provide more thoughts on other solutions and possibly if it's worth refactoring the design in general.