title: Exception handling pattern
body: <p>It is a common pattern I see where the error codes associated with an exception are stored as Static final ints. when the exception is created to be thrown, it is constructed with one of these codes along with an error message. 
  This results in the method that is going to catch it having to look at the code and then decide on a course of action. </p>
  
  <p>The alternative seems to be- declare a class for EVERY exception error case (although related exceptions would derieve from a common base class ) </p>
  
  <p>Is there a middle ground ? what is the recommended method ?</p>