Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
tt_error(library call)					tt_error(library call)

NAME
       tt_error	-- capture ToolTalk function errors

SYNOPSIS
       #include	<Tt/tt_c.h>
       void tt_error(
       const char *funcname,
       Tt_status status);

DESCRIPTION
       The  tt_error  function is a publicly-known null	function. It is	called
       by the ToolTalk library just before it returns from  any	 ToolTalk  API
       call that has a status other than TT_OK.	 The caller passes the name of
       the function that is about to return and	the function's status code.

       You can use this	function to set	a dbx breakpoint to quickly catch  and
       trace  back any ToolTalk	errors.	 You can also interpose	this function,
       for example, to log ToolTalk errors to stderr.

ARGUMENTS
       funcname	 Specifies the name of the function.

       status	 Specifies the function's return status	value.

RETURN VALUE
       None.

APPLICATION USAGE
       The following code example shows	how  an	 application  might  interpose
       this function to	log ToolTalk errors to stderr:

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

SEE ALSO
       Tt/tt_c.h - Tttt_c(5)

							tt_error(library call)

NAME | SYNOPSIS | DESCRIPTION | ARGUMENTS | RETURN VALUE | APPLICATION USAGE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=tt_error&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help