C++ Error Handling: Why Use Eithers in Favor of Exceptions and Error-Codes
The whole point of C++ exceptions is that they decouple the code that might raise exceptions from the code that handles them.<p>If you know how to handle an error when it arises, then you shouldn&#x27;t be using exceptions.  If you&#x27;re wrapping a try block around every piece of code that might throw an exception, then you&#x27;re doing it wrong.<p>The technique described in this article is not an alternative to exceptions... unless you were using exceptions wrong in the first place.<p>EDIT: Replaced &quot;any code&quot; with &quot;every piece of code.&quot;