Summary

Managing errors is something that every developer needs to take into consideration. The .NET Framework provides a unified system for managing errors, which is the exception handling. System.Exception is the root class in the exceptions hierarchy, and exceptions are handled using a Try..Catch..Finally block. You can create nested Try..Catch..Finally blocks and check exceptions conditionally using the When keyword. In the end, you can programmatically generate exceptions using the Throw keyword that is particularly useful in class libraries development. This chapter provided a high-level overview of exceptions; now you can decide which kinds of exceptions you need to handle for your code and how to take actions to solve errors. The second ...

Get Visual Basic 2015 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.