Object-oriented design patterns in the kernel, part 1
Posted Jun 16, 2011 13:46 UTC (Thu) by gowen
In reply to: Object-oriented design patterns in the kernel, part 1
Parent article: Object-oriented design patterns in the kernel, part 1
There's the matter of exception handling logic not being able to be placed where you might want it, too. With a simplistic C error handling facility I can store an error code and check it later when it matters or is most convenient.
Wow. I am truly staggered ... just utterly lost for words. Exceptions/RAII automatically propogate non-recoverable errors to the correct level of abstraction, error return values have to be propogated by hand.
With exceptions, I need to wrap each individual function call (and operator, etc.) in order to ensure that nothing slips past.
Holy living Christ on a bicycle... Do you really think that's how to write code that uses exceptions for error handling? If you do, please stop writing about it, because you don't know what you're talking about.
to post comments)