3 ms·
Avoiding exceptions isn't the worst practice. You still get automatic resource cleanup with RAII when you return from a function with an error code, which is a
by nly 13y ago
Avoiding exceptions isn't the worst practice. You still get automatic resource cleanup with RAII when you return from a function with an error code, which is a big win over completely unmanaged C.
I generally agree though, error paths are the last area I want to expose myself to flaky manual propagation and the 'well, I think I handled/freed everything' discipline. The regimental 'goto cleanup' type code you see in the kernel is not something I want in my projects.