Error Handling


SmartSockets provides some simple error handling for its C API functions. The error handling system provides additional information about why a function call failed. This is most often found in functions that return a TRUE or FALSE status. For function calls that support error handling, the global SmartSockets error number is set to a value that provides additional information about why the function failed. This global error number, which is stored in a per-thread value for multithreaded programs, can be retrieved with TutErrNumGet and set with TutErrNumSet. To simplify logging or printing notification of errors, a string describing the error can be retrieved with TutErrStrGet or TutErrNumToStr. The Diagnostics section of each function description describes how error handling is supported for that function. The error number should only be used immediately after a function which supports error handling returns a failure value. At any other time, the value of the error number is meaningless.

See the TIBCO SmartSockets API Quick Reference for the complete listing of the error codes and text for the C APIs, utilities, macros, and shell scripts.


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