Open
Description
There are many places in the codebase where we use error
, but panic
would be more appropriate. These instances usually represent something the implementor believes is a bug or would be impossible, and panic
(1) tells users that it's not their fault and (2) provides users with a suggestion of what to do: file a bug.
I would suggest adding the following to our .hlint.yaml
, so we discourage this pattern in the future:
- error:
lhs: "error x"
rhs: 'panic "nameOfFunction" [x, "more lines of details"]'