Stop Throwing Errors Your Type Checker Can't See
Thrown exceptions hide failure paths from your type system.
Your function signature says it returns a . It doesn't. It returns a or it explodes. The type system just doesn't know about the second branch. This is the…