What to return on an IndexOutOfBoundsException exception?
<p>I have the following method</p>

<pre><code>private ArrayList&lt;User&gt; allUsers = new ArrayList&lt;User&gt;();

public User getUser(int index) {
    try {
        return allUsers.get(index);
    }
    catch(IndexOutOfBoundsException e) {
        // What should I return here?? Say that you want index 0 and no User
        // exists in the ArrayList allUsers, what should I then return? The
        // method needs a User to be returned 
    }
}
</code></pre>

<p>And I'm not sure how to do here, I'm sure thats its an easy fix, but what should I return in the catch block? Eclipse is complaining that a <code>User</code> must be returned.</p>
