When ArgumentError should be thrown?

For reference you might also want to have a look at this old thread: Please stop using `error` and `ErrorException` in packages (and Base). My general feeling from that thread was that there isn’t really a consensus on how exceptions should be used, though personally I don’t use them for flow control for the reason that Tamas laid out (expense).

1 Like