Jump to content

wpQueryError

From EDM2

This instance method is called to retrieve the error identity of the last error condition.

Syntax

_wpQueryError(somSelf)

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.

Returns

ulerrorid (ULONG) - returns
Error identities.
WPERR_PROTECTED_CLASS: Class is protected.
WPERR_INVALID_CLASS: Class is invalid.
WPERR_INVALID_SUPERCLASS: Superclass is invalid.
WPERR_NO_MEMORY: Out of memory.
WPERR_SEMAPHORE_ERROR: Semaphore error.
WPERR_BUFFER_TOO_SMALL: Buffer too small.
WPERR_CLSLOADMOD_FAILED: Unable to load the class library module.
WPERR_CLSPROCADDR_FAILED: Unable to find the class entry point.
WPERR_OBJWORD_LOCATION: Bad object word location.
WPERR_INVALID_OBJECT: Object pointer is invalid.
WPERR_MEMORY_CLEANUP: Cannot free memory.
WPERR_INVALID_MODULE: Invalid class library module.
NO_ERROR: No error conditions have been set.
WPERR_USER: Application-defined errors are above this value. This value can also include any of the base (ERROR_*) error codes.
WPERR_INVALID_OLDCLASS: Old class being replaced is invalid.
WPERR_INVALID_NEWCLASS: New replacement class is invalid.
WPERR_NOT_IMMEDIATE_CHILD: New class is not an immediate child of the old class.
WPERR_NOT_WORKPLACE_CLASS: Class is not a Workplace class.
WPERR_CANT_REPLACE_METACLS: Metaclass cannot be replaced.
WPERR_INI_FILE_WRITE: Cannot write to INI file.
WPERR_INVALID_FOLDER: Folder is invalid.
WPERR_BUFFER_OVERFLOW: Buffer overflow.
WPERR_OBJECT_NOT_FOUND: No objects were found.
WPERR_INVALID_HFIND: Handle for find operation is invalid.
WPERR_INVALID_COUNT: Count of objects to find is invalid.
WPERR_INVALID_BUFFER: Buffer is invalid.
WPERR_ALREADY_EXISTS: Object already exists.
WPERR_INVALID_FLAGS: Flags are invalid.
WPERR_INVALID_OBJECTID: Object id is invalid.
WPERR_INVALID_TARGET_OBJECT: Target object is invalid.

Usage

This method can be called at any time in order to determine the identity of the last error that occurred. This method is typically called after calling a method that returned a failure.

How to Override

This method is generally not overridden.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPObject      *somSelf;        /* Pointer to the object on which the method is being invoked. */
ULONG          ulerrorid;      /* Error identities. */

ulerrorid = _wpQueryError(somSelf);

Related Methods