Hacker News new | ask | show | jobs
by feoren 530 days ago
IllegalArgumentException is OK in your book, but OverflowException is not? It's very rare that I actually care which exception type is thrown, but it's a little more polite to throw more clear and reliable exception types. But saying "this could be a little more polite and therefore YOUR CODE HAS A BUG" would make me never want to work with you again.
1 comments

Explict OverflowException could be ok but it may not tell me the root cause. A random index error is not ok at any time.