---
name: "peks_strerr"
section: "3"
platform: "linux"
package: "libnessus-dev"
version: "1.0.10-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/peks-errnum"
---

# peks\_strerr(3)

peks error message handler

Part of [peks-errnum(3)](/peks-errnum/3.md).

## NAME

peks\_strerr, errnum, errstr - peks error message handler

## SYNOPSIS

```
#include <peks.h>

char *peks_strerr (unsigned error_num);

#include <messages.h>

int errnum (SYMBOL);

const char *errstr (SYMBOL);
```

## DESCRIPTION

**Peks\_strerr ()** returns a descriptive text explaining the error number passed as the function argument.  Using error codes from the operating systems, only this function is equivalent to [**strerror**(3)](/strerror/3.md).

**Errnum ()** is a macro rather than a function, extracting the error string from the argument symbol *SYMBOL*.

**Errstr ()** is a macro rather than a function, extracting the error code from tha argument symbol *SYMBOL*. In that sense, for any valid *SYMBOL*, ths function call

**peks\_strerr (errnum (***SYMBOL***))**

returns literally the same text as  **errstr (***SYMBOL***).** The error symbols are all defined in **messages.h**.

## RETURN VALUE

The function **peks\_strerr ()** never returns NULL, so does **errstr ()**.

## SEE ALSO

[**errno**(3)](/errno/3.md), [**strerror**(3)](/strerror/3.md),

## AUTHOR

The **peks** package where these functions belong to was written by Jordan Hrycaj \<jordan@teddy-net.com\>, originally to support the **nessus** security scanner.
