Chapter 23. Exceptions

One of the biggest frustrations of development in older styles, such as COM and Win32, was the poor support for error handling. The need to deal with error codes manually, introducing lots of checks for success states, was a grueling experience that not only led to a decrease in productivity but also caused program code to look like spaghetti. And to “improve” on that, developers relied on the ultimate C solution: macros, to deal with control flow for error-handling paths and such.

With the introduction of Structured ...

Get C# 4.0 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.