![]() |
The Simons
|
#include <NullPointer.h>
Inheritance diagram for NullPointer:
Raise a NullPointer exception if an ObjectID variable is uninitialised and the program expects it to contain a valid Object reference. The most common cause of a NullPointer exception is by accidentally invoking a method on a null reference. Client programs may also raise explicit NullPointer exceptions for uninitialised variables. NullPointer provides methods to access the failed object(), the message() and the expectedType(). If the failed object is null, the system raised this NullPointer exception, otherwise the object raised it. Typically, a NullPointer exception is meant to be fatal. However, it may sometimes be handled by creating a default instance of the expected Type and using this object instead.
Public Member Functions | |
NullPointer () | |
Construct a default NullPointer. | |
virtual | ~NullPointer () |
Release a NullPointer. | |
NullPointer (ObjectID, TypeID) | |
Construct a NullPointer exception, with the expected Type. | |
NullPointer (ObjectID, ObjectID) | |
Construct a NullPointer exception, with an exemplar Object. | |
virtual ObjectID | clone () const |
Clone a shallow copy of this NullPointer. | |
Protected Member Functions | |
NullPointer (const NullPointer &) | |
Copy another NullPointer. |
|
Copy another NullPointer. Required by C++ to ensure that copying an NullPointer faithfully copies an ObjectError.
|
|
Construct a default NullPointer.
|
|
Release a NullPointer.
|
|
Construct a NullPointer exception, with the expected Type. Raised by client programs to signal that an unexpected null reference was detected in some Object, instead of an instance of the expected Type. Sets the expected Type. Recovery is not guaranteed; and depends on which default objects are currently registered with Type.
|
|
Construct a NullPointer exception, with an exemplar Object. Raised automatically whenever an attempt is made to invoke a method on a null reference. Sets the expected Type. Recovery is always possible, since the exemplar is registered with Type. NOTE: recovering from this exception is safe, provided that your C++ compiler correctly deallocates method arguments on the execution stack, since this exception is raised partway through method invocation. (This can be checked by turning on the build-option to view all reference counts).
|
|
Clone a shallow copy of this NullPointer.
Reimplemented from Exception. |