title: C++ - Arguments for Exceptions over Return Codes
body: <p>I'm having a discussion about which way to go in a new C++ project. I favor exceptions over return codes (for exceptional cases only) for the following reasons -</p>
  
  <ol>
  <li>Constructors can't give a return code</li>
  <li>Decouples the failure path (which should be very rare) from the logical code which is cleaner</li>
  <li>Faster in the non-exceptional case (no  checking if/else hundreds of thousands of times)</li>
  <li>If someone screws up the return code settings (forgets to return FAIL) it can take a very long time to track down.</li>
  <li>Better information from the message contained in the error. (It was pointed out to me that a return enum could do the same for error codes)</li>
  <li><strong>From Jared Par</strong> Impossible to ignore without code to specifically designed to handle it</li>
  </ol>
  
  <p>These are the points I've come up with from thinking about it and from google searches. I must admit to being predisposed to exceptions having worked in C# for the past couple of years. Please post further reasons for using exceptions over return codes. For those who prefer return codes, I would also be willing to listen to your reasoning. Thanks</p>