beautypg.com

Internal errors, Non-recoverable internal errors – HP Integrity NonStop J-Series User Manual

Page 249

background image

Click on the banner to return to the user guide home page.

©Copyright 1996 Rogue Wave Software

Internal Errors

Internal errors are due to faulty logic or coding in the program. Common types of internal errors
include:

Bounds errors;

Inserting a null pointer into a collection;

Attempting to use a bad date.

All of these errors should be preventable. For example, you always know the permissible range
of indices for an array, so you can probably avoid a bounds error. You would correct your
program's use of a bad date as an obvious logic error.

Internal errors can be further classified according to the cost of error detection, and whether or
not the error will be detected at run time. The two categories are:

Non-recoverable internal errors;

Recoverable internal errors.

Non-recoverable Internal Errors

Non-recoverable internal errors share the following distinguishing characteristics. They are:

Easily predicted in advance;

Encountered at relatively low levels;

Costly to detect;

Detected only in the debug version of the library.

Non-recoverable internal errors by definition have no recovery mechanism. Examples of these
errors include bounds errors, and inserting a null pointer into a collection.

Why does a library define some errors as unrecoverable? Because detecting errors takes time.
For performance reasons, a library demands some minimal level of correctness on the part of
your program, and pitches anything that falls short. Errors are non-recoverable in the sense that
the production version of the library has no mechanism for detecting such errors and, hence, no

This manual is related to the following products: