Jump to content

wpSetError

From EDM2

This instance method is called to identify an error condition.

Syntax

_wpSetError(somSelf, ulErrorID)

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
ulErrorID (ULONG) - input
Error identity. See the wpQueryError method for information about this value.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion.
FALSE: Error occurred.

Remarks

    • wpSetError** sets the last error on an object. The error identity is retrievable by issuing a call to the wpQueryError method.

Usage

This method can be called at any time in order to identify an error condition. This method is typically called prior to returning unsuccessfully from a method.

How to Override

This method is generally not overridden, unless the design of a customized error-handling system is planned.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPObject      *somSelf;      /* Pointer to the object on which the method is being invoked. */
ULONG          ulErrorID;    /* Error identity. */
BOOL           rc;           /* Success indicator. */

rc = _wpSetError(somSelf, ulErrorID);

Related Methods