Error Helper Functions
Collaboration diagram for Error Helper Functions:

OpenSSL Error Match

globus_bool_t globus_error_match_openssl_error (globus_object_t *error, unsigned long library, unsigned long function, unsigned long reason)
 

Wrap OpenSSL Error

globus_object_t * globus_error_wrap_openssl_error (globus_module_descriptor_t *base_source, int error_type, const char *source_file, const char *source_func, int source_line, const char *format,...)
 

Detailed Description

Utility functions that deal with Globus OpenSSL Error objects.

This section defines utility function for Globus OpenSSL Error objects.

Function Documentation

globus_bool_t globus_error_match_openssl_error ( globus_object_t *  error,
unsigned long  library,
unsigned long  function,
unsigned long  reason 
)

Check whether the error originated from a specific library, from a specific function and is of a specific type.

This function checks whether the error or any of it's causative errors originated from a specific library, specific function and is of a specific type.

Parameters
errorThe error object for which to perform the check
libraryThe library to check for
functionThe function to check for
reasonThe type to check for
Returns
GLOBUS_TRUE - the error matched GLOBUS_FALSE - the error failed to match

References globus_error_match_openssl_error(), and GLOBUS_ERROR_TYPE_OPENSSL.

globus_object_t* globus_error_wrap_openssl_error ( globus_module_descriptor_t *  base_source,
int  error_type,
const char *  source_file,
const char *  source_func,
int  source_line,
const char *  format,
  ... 
)

Wrap the OpenSSL error and create a wrapped globus error object from the error.

This function gets all the openssl errors from the error list, and chains them using the globus error string object. The resulting globus error object is a wrapper to the openssl error at the end of the chain.

Parameters
base_sourceThe module that the error was generated from
error_typeThe type of error encapsulating the openssl error
source_fileName of file. Use FILE
source_funcName of function. Use _globus_func_name and declare your func with GlobusFuncName(<name>)
source_lineLine number. Use LINE
formatformat string for the description of the error entry point where the openssl error occurred, should be followed by parameters to fill the format string (like in printf).
Returns
The globus error object. A globus_result_t object can be created using the globus_error_put function
See Also
globus_error_put()

References globus_error_construct_openssl_error().


about globus | globus toolkit | dev.globus

Comments? webmaster@globus.org