---
name: "globus_generic_error_utility"
section: "3"
platform: "linux"
package: "libglobus-common-doc"
version: "18.14-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_generic_error_utility"
---

# globus\_generic\_error\_utility(3)

Error Handling Helpers - Error Handling Helpers.

## NAME

globus\_generic\_error\_utility - Error Handling Helpers

 \- Error Handling Helpers.

## SYNOPSIS

### Error Match

**globus\_bool\_t** **globus\_error\_match** (globus\_object\_t \*error, **globus\_module\_descriptor\_t** \*module, int type)\

### Print Error Chain

char \* **globus\_error\_print\_chain** (globus\_object\_t \*error)\

### Print User Friendly Error Message

char \* **globus\_error\_print\_friendly** (globus\_object\_t \*error)\

## Detailed Description

Error Handling Helpers.

Helper functions for dealing with Globus Generic Error objects.

This section defines utility functions for dealing with Globus Generic Error objects.

## Function Documentation

### globus\_bool\_t globus\_error\_match (globus\_object\_t \* error, globus\_module\_descriptor\_t \* module, int type)

Check whether the error originated from a specific module and is of a specific type. \<\>

This function checks whether the error or any of it's causative errors originated from a specific module and is of a specific type. If the module descriptor is left unspecified this function will check for any error of the specified type and vice versa.

**Parameters**

*error* The error object for which to perform the check \
 *module* The module descriptor to check for \
 *type* The type to check for

**Returns**

GLOBUS\_TRUE - the error matched the module and type GLOBUS\_FALSE - the error failed to match the module and type

### char \* globus\_error\_print\_chain (globus\_object\_t \* error)

Return a string containing all printable errors found in a error object and it's causative error chain. \<\>

If the GLOBUS\_ERROR\_VERBOSE env is set, file, line and function info will also be printed (where available). Otherwise, only the module name will be printed.

**Parameters**

*error* The error to print

**Returns**

A string containing all printable errors. This string needs to be freed by the user of this function.

### char \* globus\_error\_print\_friendly (globus\_object\_t \* error)

Return a string containing error messages from the top 1 and bottom 3 objects, and, if found, show a friendly error message. The error chain will be searched from top to bottom until a friendly handler is found and a friendly message is created.

If the GLOBUS\_ERROR\_VERBOSE env is set, then the result from **globus\_error\_print\_chain()** will be used.

**Parameters**

*error* The error to print

**Returns**

A string containing a friendly error message. This string needs to be freed by the user of this function.

## Author

Generated automatically by Doxygen for globus\_common from the source code.
