The IGUIErrorInfo class represents error information that you can include in an exception object. When an OS/2 Win call results in an error condition, objects of the IGUIErrorInfo class are created. You can use the error text to construct a derived class object of IException.
The Open Class Library provides the following macros for throwing exceptions constructed with IGUIErrorInfo information:
This macro generates code that calls throwGUIError, which does the following:
You can use this class in OS/2 to create error information for GUI errors resulting from Win calls. Objects of this class obtain the error information by calling WinGetLastError, which is the Presentation Manager API that maintains the error information per thread. Motif does not have a similar mechanism where you can query the X server for error information. If you use objects of this class in AIX, they obtain a default message, which is "GUI exception condition detected."
You can create objects of this class on AIX, but the objects contain no useful information and only have the default message: "GUI exception condition detected."
You can use objects of the IGUIErrorInfo class to obtain information about the last error that occurred on a call to Presentation Manager.
You can construct and destruct objects of this class. You cannot copy or assign objects of this class.
![]() |
public:
virtual ~IGUIErrorInfo()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IGUIErrorInfo(const char* GUIFunctionName = 0)
You can only construct objects of this class using the default constructor.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to return error information provided by objects of this class.
![]() |
public:
virtual unsigned long errorId() const
Returns the error ID.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
In the case of a Presentation Manager error, the IGUIErrorInfo constructor obtains the errorId using WinGetLastError.
![]() |
public:
virtual bool isAvailable() const
If the error information is available, true is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual operator const char *() const
Returns the error text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual const char* text() const
Returns the error text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to support the throwing of exceptions using information from an IGUIErrorInfo object. The throwGUIError function is used by the ITHROWGUIERROR macro.
![]() |
public:
static void throwGUIError( const char* functionName, const IExceptionLocation& location, IBaseErrorInfo::ExceptionType name = accessError, IException::Severity severity = IException::recoverable )
Creates an IGUIErrorInfo object and uses the text from it to do the following:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
virtual ~IBaseErrorInfo()
virtual unsigned long errorId() const = 0
IBaseErrorInfo()
virtual bool isAvailable() const = 0
virtual operator const char *() const = 0
virtual const char* text() const = 0
void throwError( const IExceptionLocation& location, ExceptionType name = accessError, IException::Severity severity = IException::recoverable, IException::ErrorCodeGroup errorGroup = IException::baseLibrary )