Error Handling

  • Carsten Thomsen


Any application needs to handle errors that occur at runtime. Unfortunately it can be difficult to resolve all the possible errors that can occur. However, it is always a good idea to try to create code that can resolve most errors, so that the user doesn’t have to worry about them. You should then attempt to catch the rest of them and display an error message with detailed information to the user about how to continue from this point. The overall purpose of error handlers is to allow the program to gracefully recover from things going awry. This is especially important when dealing with relational databases. Since you are passing through multiple layers of technology, there are many places that an application can break. Although this chapter is about handling data-related exceptions, I will cover the basics for handling all kinds of exceptions briefly.


Line Number Exception Handler Error Handling Normal Code Catch Statement 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Carsten Thomsen 2001

Authors and Affiliations

  • Carsten Thomsen

There are no affiliations available

Personalised recommendations