TutPerror


Name

TutPerror — report UNIX error messages to an output window

Synopsis

void TutPerror(msg) 
T_STR msg; 

Arguments

msg — message to be printed at the beginning of the output

Return Values

None

Diagnostics

None

Description

TutPerror emulates the perror function but directs the output through TutOut, which causes the output to go to the process output window.

Caution

TutPerror should only be called when the global SmartSockets error number is set to T_ERR_C, T_ERR_OS or T_ERR_SOCKET.

See Also

TutWarning, TutOut

Examples

This example prints an error message when a function fails:

if (!some_api_func() 
      && (TutErrNumGet() == T_ERR_C 
          || TutErrNumGet() == T_ERR_OS 
          || TutErrNumGet() == T_ERR_SOCKET)) { 
  TutPerror("some_api_func"); 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com