The ISystemErrorInfo class represents error information that you can include in an exception object. When an operating system call results in an error condition, objects of the ISystemErrorInfo class are created. You can use the error text to construct a derived class object of IException.
The Open Class Library provides the ITHROWSYSTEMERROR macro for throwing exceptions constructed with the following ISystemErrorInfo information:
This macro generates code that calls throwSystemError, which does the following:
You can create objects of this class on AIX, but the objects contain no useful information and only have the default message: "System exception condition detected."
Constructors & DestructorYou can construct and destruct objects of this class. You cannot copy or assign objects of this class.
![]() |
public:
virtual ~ISystemErrorInfo()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
ISystemErrorInfo( unsigned long systemErrorId, 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 error ID.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
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 |
Throw SupportUse these members to support the throwing of exceptions.
![]() |
public:
static void throwSystemError( unsigned long systemErrorId, const char* functionName, const IExceptionLocation& location, IBaseErrorInfo::ExceptionType name = accessError, IException::Severity severity = IException::recoverable )
Used by the ITHROWSYSTEMERROR macro, this function creates an ISystemErrorInfo 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 )