![]() |
The Simons
|
#include <NoElements.h>
Inheritance diagram for NoElements:
Raise a NoElements exception if an attempt is made to extract an element from an empty Collection. Similar dispensing containers may also raise this exception. NoElements provides access to the failed object(), the error message(), the failed method() and a default element(). Typically, a NoElements exception indicates a semantic failure in a program which tried to retrieve more elements than it stored, so is treated as fatal. However, certain dispensing programs may wish to recover. These should supply a default element when the NoElements exception is raised. This element may be cloned during recovery and used in place of the missing element.
Public Member Functions | |
NoElements () | |
Construct a default NoElements. | |
virtual | ~NoElements () |
Release a NoElements. | |
NoElements (ObjectID, StringID) | |
Construct a NoElements exception. | |
NoElements (ObjectID, StringID, ObjectID) | |
Construct a NoElements exception, supplying a default element. | |
virtual ObjectID | clone () const |
Clone a shallow copy of this NoElements. | |
ObjectID | element () const |
Access the default element. | |
Protected Member Functions | |
NoElements (const NoElements &) | |
Copy another NoElements. | |
Protected Attributes | |
ObjectID | defaultElement |
A default element, or null. |
|
Copy another NoElements. Required by C++ to ensure that copying an NoElements faithfully copies a MethodError.
|
|
Construct a default NoElements.
|
|
Release a NoElements.
|
|
Construct a NoElements exception. Raised when an attempt is made to access an element of an empty Collection. May also be raised by other kinds of dispensing container, when they run out of elements. The default element is set to null.
|
|
Construct a NoElements exception, supplying a default element. Raised when an attempt is made to access an element from a fail-safe dispensing container, when this becomes empty. During recovery, the default element may be used directly, or cloned by the program.
|
|
Clone a shallow copy of this NoElements.
Reimplemented from Exception. |
|
Access the default element.
|
|
A default element, or null.
|