GLOBUS_ERROR_CONSTRUCT_ERROR(3)

✨ globus_generic_error_object β€” Error Construction ✨

hiii bestie 🫢 so this lil page is from the Library Functions Manual, and it's literally all about globus_generic_error_object(3). if you've ever been like "how do i even make an error object in Globus," this is the page. it's giving error-construction central, no cap πŸ’…


🌸 NAME 🌸

globus_generic_error_object β€” Error Construction.

  • Error Construction.

πŸŽ€ SYNOPSIS πŸŽ€

Macros

#define GLOBUS_ERROR_TYPE_GLOBUS

Construct Error

globus_object_t * globus_error_construct_error
    (globus_module_descriptor_t *base_source, globus_object_t
    *base_cause, int type, const char *source_file, const char
    *source_func, int source_line, const char *short_desc_format,...)

globus_object_t * globus_error_v_construct_error
    (globus_module_descriptor_t *base_source, globus_object_t
    *base_cause, const int type, const char *source_file, const char
    *source_func, int source_line, const char *short_desc_format,
    va_list ap)

Initialize Error

globus_object_t * globus_error_initialize_error (globus_object_t *error,
    globus_module_descriptor_t *base_source, globus_object_t
    *base_cause, int type, const char *source_file, const char
    *source_func, int source_line, const char *short_desc_format,
    va_list ap)

πŸ’œ Detailed Description πŸ’œ

Error Construction.

Create and initialize a Globus Generic Error object.

This section defines operations to create and initialize Globus Generic Error objects.

like. that's the whole vibe. you make one, you init one, you go about your day ✨


πŸ¦‹ Macro Definition Documentation πŸ¦‹

#define GLOBUS_ERROR_TYPE_GLOBUS

Error type definition.


πŸ‘‘ Function Documentation πŸ‘‘

globus_object_t * globus_error_construct_error (globus_module_descriptor_t * base_source, globus_object_t * base_cause, 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.

Parameters

  • base_source β€” Pointer to the originating module.
  • base_cause β€” The error object causing the error. If this is the original error this parameter may be NULL.
  • 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.

Returns

The resulting error object. It is the user's responsibility to eventually free this object using globus_object_free(). A globus_result_t may be obtained by calling globus_error_put() on this object.

okay so heads up bestie: you own this object now. free it with globus_object_free() or it just. lingers. πŸ’€

globus_object_t * globus_error_initialize_error (globus_object_t * error, globus_module_descriptor_t * base_source, globus_object_t * base_cause, int type, const char * source_file, const char * source_func, int source_line, const char * short_desc_format, va_list ap)

Initialize a previously allocated error of type GLOBUS_ERROR_TYPE_GLOBUS.

Parameters

  • error β€” The previously allocated error object.
  • base_source β€” Pointer to the originating module.
  • base_cause β€” The error object causing the error. If this is the original error this parameter may be NULL.
  • 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.
  • ap β€” Arguments for the format string.

Returns

The resulting error object. You may have to call globus_error_put() on this object before passing it on.

note the difference bestie: this one takes an error you already allocated, and yeah, you may have to call globus_error_put() on it before you pass it along. 🫢

globus_object_t * globus_error_v_construct_error (globus_module_descriptor_t * base_source, globus_object_t * base_cause, const int type, const char * source_file, const char * source_func, int source_line, const char * short_desc_format, va_list ap)

Allocate and initialize an error of type GLOBUS_ERROR_TYPE_GLOBUS.

Parameters

  • base_source β€” Pointer to the originating module.
  • base_cause β€” The error object causing the error. If this is the original error this parameter may be NULL.
  • 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.
  • ap β€” Arguments for the format string.

Returns

The resulting error object. It is the user's responsibility to eventually free this object using globus_object_free(). A globus_result_t may be obtained by calling globus_error_put() on this object.

the v is for va_list, iykyk 😌 same deal as the big one β€” you free it with globus_object_free(), and you can grab a globus_result_t via globus_error_put().

⭐ Author ⭐

Generated automatically by Doxygen for globus_common from the source code.


okay that's the whole page, bestie!! πŸ’– you absolutely ate this one. this came to you courtesy of globus_common, Version 18.15, dated alongside globus_gen...rror_object(3) β€” mwah, go build some errors, you got this πŸ‘‘βœ¨

πŸ“¦ where this page comes from