|
|
|
|
|
by iainmerrick
2930 days ago
|
|
Exceptions are part of the reason that RAII is so critical in the C++ world. I don’t think that’s quite true. You definitely want RAII with exceptions, yes, but RAII is extremely useful even without exceptions. I believe it’s common to disable C++ exceptions but still use RAII. If you have multiple returns from a function (which can very easily happen with manual error checking) RAII is a big win. |
|
Which is another way of saying exceptions are part of the reason for RAII.