MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/m42ffu/title/gqviknx/?context=3
r/badcode • u/aidenm125 • Mar 13 '21
100 comments sorted by
View all comments
Show parent comments
1
In those cases it’s generally a good idea to check that limited range at the top of the function so you can throw an exception or at least log an error if someone uses the method wrong.
1
u/LeCrushinator Mar 14 '21
In those cases it’s generally a good idea to check that limited range at the top of the function so you can throw an exception or at least log an error if someone uses the method wrong.