Common Desktop Environment: ToolTalk Messaging Overview

tt_error

void tt_error(const char *funcname, Tt_status
status)

The tt_error() function is a publicly-known null function. This function is called by the ToolTalk library just before it returns from any ToolTalk API call that has a status other than TT_OK. The name of the function that is about to return and the status code is passed. You can use this call to set a dbx breakpoint in tt_error() to quickly catch and trace back any ToolTalk errors. You can also interpose this function, for example, to log ToolTalk errors to stderr. The following code example shows how an application might do this.

void 
tt_error(const char *funcname, Tt_status status) 
{
 	fprintf(stderr, "ToolTalk function %s returned %s.\n",
 			funcname, tt_status_message(status));  
}