Exceptions and error codes in Java
<p>I have a query regarding error handling in java. Suppose for a library there are several error codes. Is it a good practice to have a single exception and include an enum of error codes in side that, for various errors ?</p>

<p>Update: Is it a good practice to have error codes within an exception?</p>
