(1) Field of the Invention
The invention relates to computer systems. More specifically, the invention relates to error handling in an inheritance or nested hierarchies of arbitrary depth.
(2) Related Art
In object-oriented programming, one object is frequently derived from another object with a third object being derived from the second object, and so forth. This is known as collaboration by inheritance. When an inheritance hierarchy is arbitrarily deep, the handling of errors at the various levels of inheritance becomes very complex. The complexity of error handling becomes exponentially proportional and, in the worst case, will be on the order of 2.sup.N where N is the depth of the hierarchy.
When an error occurs in a prior art inheritance hierarchy, no clear protocol exists for handling the error. This leaves open the questions of whether the object handles the error by itself. Whether if at all, the parent is informed that an error has occurred. In other words, there is no uniform handling of errors in inheritance hierarchies. Rather, each hierarchy may handle errors in a unique way. This does not facilitate code reuse and ultimately results in longer and slower source code. Similarly, because there is no uniform way of handling errors, there is no uniform acts that can be expected when a severe error occurs, nor is there any procedure for notification of the application when an error can be bypassed or ignored. Moreover, from a programmer's perspective, it is often desirable to be able to determine at what level the error is generated and which objects are responsible for it. Prior art error handling on an ad hoc basis fails to address these issues.
Accordingly, it would be desirable to have a system for uniformly handling errors in an arbitrarily deep inheritance hierarchy. It would be desirable to be able to identify an underlying source of a high level error to permit the underlying cause of the error to be treated.