The WPObject class provides methods which can be overridden to design your own error handling system.

The wpQueryError method obtains the error identity that was set on an object by the last call to wpSetError. The wpQueryError method can be called at any time.

The wpSetError method sets the error identity on an object. Typically, this method is called prior to returning from a method that is unsuccessful. The wpQueryError method is then called to identify the error.

Similar to object errors, class errors can also be queried and set using wpclsQueryError and wpclsSetError.

The wpclsQueryError method obtains the error identity that was set on a class object by the last call to wpclsSetError. The wpclsQueryError method can be called at any time.

The wpclsSetError method sets the error identity on a class object. Typically, this method is called prior to returning from a class method that is unsuccessful. The wpclsQueryError method is then called to identify the error.


[Back] [Next]