3 ms·
OP here. Totally agree. TIL about RAII. That particular codebase doesn't use c++ exceptions, but still not a reason for a roll-your-own solution if something as
by s_kanev 13y ago
OP here. Totally agree. TIL about RAII.
That particular codebase doesn't use c++ exceptions, but still not a reason for a roll-your-own solution if something as efficient is in the standard library.
- dicroce 13y agoDoes it use the STL? The STL will throw. Does it use the new operator? new will throw unless you specifically tell it not to.
- s_kanev 13y agoOk, should've been more specific -- it doesn't catch any exceptions and lets them bring down the program and have the project maintainer check what they did wrong.