4 ms·
How does this version handle exceptions?
by lumpypua 11y ago
How does this version handle exceptions?
- KeytarHero 11y agoIt doesn't. Just like the example it replaces. I'm not saying this is the best way to write this code - there are several reasons RAII is better. But in this case, "look how messy non-RAII code is!" isn't the reason.
- st3fan 11y agoThe original example does actually properly deal with exceptions.
- Devid2014 11y agoThis code work with assertion that constructors of A and B will never throw !