title: exception hierarchy vs error enumeration
body: <p>I read somewhere (can't find it now) that large exception hierarchies are a waste of time.  The justification for this statement seemed sound at the time and the idea stuck with me.</p>
  
  <p>In my own code when I have a code base that can have a range of error conditions I use a single exception with an enumeration member to differentiate between them.</p>
  
  <p>If the case arises that I need to catch on one of these errors, I catch it, check the enum and rethrow if it was not what I expected.  Ideally, this should be rare.</p>
  
  <p>I was working with exceptions again and the I had a reflective moment where I questioned my exception habits.  I am curious what everyone else does and why?</p>
  
  <p>Hierarchy or one exception with data members.</p>
  
  <p>BTW, I am assuming you agree with the idea of exception vs error codes.  I don't wish to open that can of worms.</p>