You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems there is small difference how pairs vs ipairs handle it when you explicitly put incorrect argument type.
While pairs provides bad argument error, ipairs instead attempts to index that wrong type value, leading to different error that is less readable to end user.
I understand from #87 that iterator returned by ipairs is supposed to be what is handling the erroring, but would it be possible to change the error handling of the iterator to be one for incorrect argument instead attempt to index? It would improve clarity and to simplify debugging for end users.
The text was updated successfully, but these errors were encountered:
It seems there is small difference how pairs vs ipairs handle it when you explicitly put incorrect argument type.
While pairs provides bad argument error, ipairs instead attempts to index that wrong type value, leading to different error that is less readable to end user.
Cobalt/src/main/java/org/squiddev/cobalt/lib/BaseLib.java
Lines 221 to 235 in 6a4e506
I understand from #87 that iterator returned by ipairs is supposed to be what is handling the erroring, but would it be possible to change the error handling of the iterator to be one for incorrect argument instead attempt to index? It would improve clarity and to simplify debugging for end users.
The text was updated successfully, but these errors were encountered: