Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

5.1 Overview

Now that you understand the basic use of DBTools.h++, it's time to confront the things that can go wrong. Error handling can be a messy topic under the best of circumstances. Mixing client/server computing with assorted message formats from various vendors, who may offer incomplete support for C++ exceptions, makes it even more complex. The DBTools.h++ error model aims to keep as many options as possible under your control, while providing sensible default behavior where your application does not take explicit action.

Let's begin our discussion of the DBTools.h++ error model with an example. This one is from Section 6.5:

What would happen if each row of anotherTable contained two strings, rather than a string and a float? Or if the database server crashed in the middle of the loop? Or if the application lacked permission to read anotherTable? The good news is that your application wouldn't crash because of one of these errors. Of course, your application still needs to know that an error occurred. With the DBTools.h++ error model, there are three ways to provide this information:

The following sections explain the advantages and disadvantages of these alternatives in detail. We have kept the design of the DBTools.h++ error model as flexible as possible, to accommodate the different needs of different applications.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.