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. Use the error number immediately after a function which supports error handling returns a failure value. At any other time, the value of the error number is meaningless.

For a list of SmartSockets error codes, numbers and descriptions, see the TIBCO SmartSockets API Quick Reference.


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