-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw more specific error, ArgumentError, rather than a general Error() #1872
Conversation
Co-Authored-By: Bogumił Kamiński <bkamins@sgh.waw.pl>
@bkamins Thanks. I agree your code is easy to read. In fact, I can see several long lines exploiting short circuits. Do you think we need to rewrite the lines to more readable ones? If so, I can help you. |
Sure - thank you. The "soft" rule is that lines should not be longer than 92 characters. |
Co-Authored-By: Milan Bouchet-Valat <nalimilan@club.fr>
I like the new message about more specific about the cause. Commit to the branch and ready to be merged. Thanks. |
One quick question before merging. In this case, |
Right, |
Ok. I have replaced ArgumentError with DimensionMismatch and also touched a unit test for it. I can see the same change would be desirable for some other code lines but it can be captured in a separate PR. I think it is ready to merge. Thanks for all your inputs. |
Yes, we used |
Also changed the unit test to check ArgumentError, not ErrorException.
#1867