Objects of the class IException and its derived classes use IException::TraceFn to log exception object data.
A default TraceFn derived object is registered by the Collection Class Library. If the User Interface Library is used, it registers a TraceFn derived object, which overrides the write function. It uses ITrace to write out the buffers of data, so the buffers will be written to wherever the ICLUI TRACETO environment variable directs the output from ITrace.
If you want to provide your own tracing function, derive your own class from IException::TraceFn and register it with IException using IException::setTraceFunction. You can completely take over exception logging by overriding the logData function. You are passed the IException object so you can completely customize the logging of exception data. If you only want to change how the buffers of exception data are logged, you should override the write function.
The exceptionLogged function is provided so that you can determine when the last buffer of exception data has been passed to the write function by the default logData function. This allows you to gather all of the exception data by only overriding the write and exceptionLogged functions for situations where you must write out all of the exception data with one call.
The only way to create objects of this class is from a derived class. To enforce this, the only constructors we provide for this class are protected.
Derived classes use these members to create objects of this class.
![]() |
protected:
TraceFn()
This default constructor can be used by derived classes to create objects of this class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The IException's logExceptionData member uses these members to log instance data of exception objects.
![]() |
public:
virtual void logData(IException& exception)
Logs error information contained in an IException object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual void write(const char* buffer)
Writes a buffer of exception data.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual void exceptionLogged()
This function is called by the default logData function after the last buffer of exception data has been passed to the write function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |