Having a function throwError makes me squirm.
`isValid() || throwError()` is an abuse of abstraction
`isValid() || throwError()` is an abuse of abstraction
Much of my code, for example, is fail fast, and then I have error handling, supervisors, etc, at a level that can log and restart the work.
I'm a little disappointed no one mentioned this even as a side comment, since there's a whole section on doing short-circuit evaluation, even if it's not in a way that would cause this kind of problem.