I\'ve been updating an existing library to throw exceptions to help improve debugging by people using the library.
At first, I thought I\'d define exceptions specific to
From Effective Java
You should favor the use of standard exceptions and use the Java platform libraries set of unchecked exceptions that cover what you described. Reusing exceptions has the following benefits :
Makes your API easier to learn and use because it matches established conventions with which programmers are already familiar
Fewer Exception classes means a smaller memory footprint and less time spent loading classes.