---
name: "uexterr_gettext"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/uexterr_gettext"
---

# uexterr\_gettext(3)

get string representation of the current extended error

## NAME

**uexterr\_gettext** – get string representation of the current extended error

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<exterr.h\>**

*int*\

**uexterr\_gettext**(*char \*buffer*, *size\_t buffer\_size*);

## DESCRIPTION

The **uexterr\_gettext** function fills the buffer pointed to by the *buffer* pointer with the formatted extended null-terminated error string, as reported by the last error from a system call, which returned an extended error. The capacity of the passed buffer is *buffer\_size* bytes.

Normally, applications should use the [err(3)](/err/3.md) family of functions to display errors from system calls. If this is not convenient or even not possible, for instance for applications with an advanced user interface, the **uexterr\_gettext** function can be used to fetch the string with the extended error.

Note that most parts of the extended errors are directly provided by the kernel, and as such cannot be localized.

See [exterror(9)](/exterror/9.md) for the description of the extended error facilities.

## RETURN VALUES

The function returns zero. There are currently no errors defined for the function, which might change in future.

If any error condition is added, it will be reported by returning -1 and setting *errno* to the corresponding value.

## SEE ALSO

[err(3)](/err/3.md), [errno(3)](/errno/3.md), [exterror(9)](/exterror/9.md)

## STANDARDS

The **uexterr\_gettext** is a FreeBSD extension that first appeared in FreeBSD 15.0.
