cromshell icon indicating copy to clipboard operation
cromshell copied to clipboard

Create a convention for how we report errors.

Open bshifaw opened this issue 1 year ago • 0 comments

This is a bigger issue than this PR, but we need to come up with a convention for how we report errors. I think that we have to choose something and try to be consistent in all of our tools. We currently have a mix of log and quit, log and print, log and throw, just throw, and probably just log. It's confusing.

I'm a big fan of the GATK distinction between UserException and GATKException. UserExceptions are error conditions that are probably the fault of the user, like accessing still running workflow or having a full disk. GATKExceptions are cases we thought about which might happen if there is a bug somewhere else generally. And then there are just the native exceptions thrown by the code we call.

I think we should consider something similar. (*not necessarily in this pr)

Originally posted by @lbergelson in https://github.com/broadinstitute/cromshell/pull/240#discussion_r1085546731

bshifaw avatar Feb 08 '23 21:02 bshifaw