O'Reilly logo

Beginning C# 5.0 Databases, Second Edition by Vidya Vrat Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C H A P T E R  11

Handling Exceptions

For the programs you write, you definitely care about fixing any errors or problems that are brought to your attention by the language compiler. However, there is a particular type of error that doesn’t happen during compile time; instead, it occurs at runtime. As you progress into more complex application development, you have more chances of getting such runtime errors, known as exceptions. They can occur because the application is trying to open a connection to a nonexistent database, open a file that doesn’t exist, or write to a file that is already open in read-only mode. This chapter will help you learn more about exceptions and how to handle them when they occur.

The System.Exception Class

In .NET, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required