A Standard Exception Model

.NET offers a standard exception model. Exception handling is implemented within the CLR and is not specific to a managed language. Each managed language exposes exception handling using language-specific syntax. The standard exception model contributes to language independence, which is an important tenet of .NET. In addition, exceptions raised in one managed language can be caught in a different managed language. Prior to .NET, there were competing models for error handling: Microsoft Visual Basic 6.0, Visual C++, the Win32 Software Development Kit (SDK), Microsoft Foundation Classes (MFC), and Component Object Model (COM) had different exception models. In a component-driven architecture, this diversity contributes to complexity and potential product instability. In .NET, exception handling between disparate components is consistent, simple, and stable.

In .NET, the standard exception model is structured exception handling, which is essentially the try and catch statements. C-based language developers and Java developers are probably familiar with structured exception handling. For Visual Basic developers, this is a seismic shift from unstructured exception handling. The unstructured model, such as on error goto and on error resume, is thankfully now obsolete.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.221.133