Best way to enforce argument requirements (assert vs. exception, or something else)?

No.

Yes, but not an error most of the time.

https://docs.julialang.org/en/v1/manual/control-flow/#Built-in-Exceptions and the multiple entries following https://docs.julialang.org/en/v1/base/base/#Core.ArgumentError tells you when to use which excepiton type.

3 Likes