![]() |
Helper functions for dealing with Globus Errno Error objects.
This section defines utility functions for dealing with Globus Errno Error objects.
globus_bool_t globus_error_errno_match | ( | globus_object_t * | error, |
globus_module_descriptor_t * | module, | ||
int | system_errno | ||
) |
Check whether the error originated from a specific module and matches a specific errno.
This function checks whether the error or any of it's causative errors originated from a specific module and contains a specific errno. If the module descriptor is left unspecified this function will check for any error of the specified errno and vice versa.
error | The error object for which to perform the check |
module | The module descriptor to check for |
system_errno | The errno to check for |
globus_object_t* globus_error_wrap_errno_error | ( | globus_module_descriptor_t * | base_source, |
int | system_errno, | ||
int | type, | ||
const char * | source_file, | ||
const char * | source_func, | ||
int | source_line, | ||
const char * | short_desc_format, | ||
... | |||
) |
Allocate and initialize an error of type GLOBUS_ERROR_TYPE_GLOBUS which contains a causal error of type GLOBUS_ERROR_TYPE_ERRNO.
base_source | Pointer to the originating module. |
system_errno | The errno to use when generating the causal error. |
type | The error type. We may reserve part of this namespace for common errors. Errors not in this space are assumed to be local to the originating module. |
source_file | Name of file. Use __FILE__ |
source_func | Name of function. Use _globus_func_name and declare your func with GlobusFuncName(<name>) |
source_line | Line number. Use __LINE__ |
short_desc_format | Short format string giving a succinct description of the error. To be passed on to the user. |
... | Arguments for the format string. |