hx509_error(3)

πŸ“¦
version 7.8.0 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, epel 10, epel 9, fedora 43, fedora 44

✨ NAME ✨

hx509_error β€” the hx509 error functions, aka the part of the Heimdal x509 library that handles all your "wait what went wrong 😭" moments. This is page 3 of the manual, bestie, and it's all about error strings. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

the functions, all six of them, no skips 🫢

void hx509_clear_error_string (hx509_context context)
void hx509_set_error_stringv (hx509_context context, int flags, int
    code, const char *fmt, va_list ap)
void hx509_set_error_string (hx509_context context, int flags, int code,
    const char *fmt,...)
char * hx509_get_error_string (hx509_context context, int error_code)
void hx509_free_error_string (char *str)
void hx509_err (hx509_context context, int exit_code, int error_code,
    const char *fmt,...)

πŸ’– DETAILED DESCRIPTION πŸ’–

okay so if you want the actual tea β€” the full description plus examples β€” go read the Hx509 error reporting functions. That's where it's at. This page is just the receipts. ✨


πŸŽ€ FUNCTION DOCUMENTATION πŸŽ€

void hx509_clear_error_string (hx509_context context)

Resets the error strings the hx509 context. like a lil factory reset for your error messages, but only the error messages 🧹✨

Parameters

  • context β€” A hx509 context.

void hx509_err (hx509_context context, int exit_code, int error_code, const char * fmt, ...)

Print error message and fatally exit from error code. yes bestie, fatally β€” this one does not come back. it prints and then it's gone πŸ’€ dramatic but honest.

Parameters

  • context β€” A hx509 context.
  • exit_code β€” exit() code from process.
  • error_code β€” Error code for the reason to exit.
  • fmt β€” format string with the exit message.
  • ... β€” argument to format string.

void hx509_free_error_string (char * str)

Free error string returned by hx509_get_error_string(). clean up after yourself, it's giving basic hygiene 🫢

Parameters

  • str β€” error string to free.

char* hx509_get_error_string (hx509_context context, int error_code)

Get an error string from context associated with error_code. the little lookup that tells you what actually happened πŸ”

Parameters

  • context β€” A hx509 context.
  • error_code β€” Get error message for this error code.

Returns

error string, free with hx509_free_error_string().

not me reminding you again: you must free it with hx509_free_error_string(). no cap, that's a leak otherwise 🌸

void hx509_set_error_string (hx509_context context, int flags, int code, const char * fmt, ...)

See hx509_set_error_stringv(). same energy, just the variadic glow-up ✨

Parameters

  • context β€” A hx509 context.
  • flags
    • HX509_ERROR_APPEND appends the error string to the old messages (code is updated).
  • code β€” error code related to error message
  • fmt β€” error message format
  • ... β€” arguments to error message format

void hx509_set_error_stringv (hx509_context context, int flags, int code, const char * fmt, va_list ap)

Add an error message to the hx509 context. stacking messages like a group chat thread πŸ“±

Parameters

  • context β€” A hx509 context.
  • flags
    • HX509_ERROR_APPEND appends the error string to the old messages (code is updated).
  • code β€” error code related to error message
  • fmt β€” error message format
  • ap β€” arguments to error message format

πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for Heimdal x509 library from the source code. the robots did this one, not me πŸ™ˆπŸ’…


okay that's the whole page bestie, and here's the cute lil sign-off: this is Version 7.8.0, dated Tue Nov 15 2022 β€” so like, retro but still iconic βœ¨πŸ‘‘πŸ¦‹ thanks for reading, go handle your errors responsibly, mwah πŸ’–

πŸ“¦ where this page comes from