«The technique was developed for exception-safe resource
management in C++[3] during 1984–89»

http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization

It may have been developed for exceptions, that doesn't mean you have to use them together.

Alternative error reporting methods I prefer:
-return optional type, is empty if it failed
-accept continuation of what to do once operation secedes
  ie:
     open_file("blah.txt",
[](file& f){..}}//called when it opened successfully
               //could also have a 2nd lambda for when it fails

Reply via email to