Switch Error Codes
<p>How do I create an error handler in Android. In .Net I would simply create a handler the switch the error codes to relay the correct response required to the user.</p>

<p>In this case I am using a SAX parser surrounded by try and catch, when an error is raised I obviously get a message but no unique error ID. there may be ten errors captured by the try\catch block but how do I distinguish between the errors so I can try and handle the expected errors?</p>

<p>Ideally something like this:</p>

<pre><code>switch (e.getErrorID){
case 1000:
   //Handle This Expected Error
break;
case 1064:
    //Handle This Expected Error
break;
case 2025:
    //Handle This Expected Error
break;
default:
    //Unexpexted Error
}
</code></pre>

<p>Maybe I should mention, the error im trying to catch is empty document</p>
