Error Handling with Exceptions

Why does .NET take such a Draconian stance on error handling? With C++, several methods were available for handling errors, exceptions being among them. VB had an error-handling scheme that was remarkably similar to exceptions. The list goes on; each language had its own method of dealing with errors. Indeed, that was the problem. Each language had one or more ways of handling errors. One of the goals of the .NET platform was to create a unified environment where all languages were “equal.” For a language to interoperate seamlessly with another language, the error-handling schemes must be the same. If the error handling tried to be all things to all languages, then every time a new language or even a new error-handling ...

Get .NET Common Language Runtime 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.