broadinstitute / cromshell

CLI for interacting with Cromwell servers
BSD 3-Clause "New" or "Revised" License
53 stars 15 forks source link

Create a convention for how we report errors. #243

Open bshifaw opened 1 year ago

bshifaw commented 1 year ago

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_