<p>I have been in both situations: </p>

<ul>
<li>Creating too many custom Exceptions</li>
<li>Using too many general Exception class</li>
</ul>

<p>In both cases the project started OK but soon became an overhead to maintain (and refactor).</p>

<p>So what is the best practice regarding the creation of your own Exception classes?</p>

Basically, each job deserves an own exception. When you catch exceptions, you don't distinguish different instances, like you would normally do with objects, therefore you need different subtypes. Using too many custom exceptions is a case which I see hardly occurring.
One advice would be to create exceptions as needed, and if it becomes apparent that one exception type is a duplicate of another, refactor the code by merging the two. Of course it helps if some thought goes into structuring exceptions from the beginning. But generally, use custom exceptions for all cases that have no 1:1 correspondence to existing, situation-specific exceptions.
On the other hand,
```
NullPointerException
```
s and
```
IndexOutofBoundsException
```
s might actually often be appropriate. Don't catch these, though (except for logging) as they're a programming error which means that after throwing them, the program is in an undefined state.