Change assertions to exceptions with helpful messages where relevant
There are a lot of places in the code where exceptions instead of assertions should be used. Assertions should only be used to check for conditions that are logically impossible to happen and should not be relied upon to always be called (see [docs](https://docs.julialang.org/en/v1/base/base/#Base.@assert)). In cases such as bad inputs to user facing functions, appropriate exceptions such as `ArgumentError` should be thrown.
0 条评论