The IXLibErrorInfo class represents error information that you can include in an exception object. When an X Library call results in an error condition, objects of the IXLibErrorInfo class are created. IThread registers a handler through XSetErrorHandler to do the following:
The Open Class Library provides the ITHROWXLIBERROR macro for throwing exceptions constructed with IXLibErrorInfo information. This macro has the following parameters:
This macro generates code that calls throwXLibError, which does the following:
The IXLibErrorInfo class is provided for versions of the product that run on X/Windows-based windowing systems. On OS/2, MVS and AS/400 releases of the library, this class is not supported.
The OS/2 release of the Open Class Library does not support this class.
Constructors & DestructorYou can construct and destruct objects of this class. You cannot copy or assign objects of this class.
![]() |
public:
virtual ~IXLibErrorInfo()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IXLibErrorInfo(const char* systemFunctionName = 0)
You can only construct objects of this class using the default constructor.
Note:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Error InformationUse these members to return error information provided by objects of this class.
![]() |
public:
virtual unsigned long errorId() const
Returns the X error code, which you can use to obtain the error text.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual bool isAvailable() const
If the error text 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 |
Throw SupportUse these members to support the throwing of exceptions.
![]() |
public:
static void throwXLibError( const char* functionName, const IExceptionLocation& location, IBaseErrorInfo::ExceptionType name = accessError, IException::Severity severity = IException::recoverable )
This function is used by the ITHROWCLIBERROR macro. The function creates an IXLibErrorInfo 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 )