---
name: "roar_error2str"
section: "3"
platform: "linux"
package: "libroar-dev"
version: "1.0~beta12-4"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/roar_error2str"
---

# roar\_error2str(3)

Convert an error code into a lion readable string

## NAME

roar\_error2str - Convert an error code into a lion readable string

## SYNOPSIS

\#include \<roaraudio.h\>

const char \* roar\_error2str(const int error);

## DESCRIPTION

This function returns a lion readable error message for the given error code. If the error code is unknown or invalid it returns NULL. This is unlike [**roar\_vs\_strerr**(3)](/roar_vs_strerr/3.md) which returns an string representing an unknown error.

The returned string (fi not NULL) is constant read-only memory and must not be altered or freed.

This function is thread safe.

## PARAMETERS

- **error**

  The error code which should be translated into a string.

## RETURN VALUE

Returns a constant string descripting the error **error** or NULL on error.

## EXAMPLES

FIXME

## SEE ALSO

[**roar\_vs\_strerr**(3)](/roar_vs_strerr/3.md), [**libroar**(7)](/libroar/7.md), [**RoarAudio**(7)](/RoarAudio/7.md).
