---
name: "xs_strerror"
section: "3"
platform: "linux"
package: "libxs-dev"
version: "1.2.0-2"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/xs_strerror"
---

# xs\_strerror(3)

get error message string

## NAME

xs\_strerror - get error message string

## SYNOPSIS

**const char \*xs\_strerror (int** *errnum***);**

## DESCRIPTION

The *xs\_strerror()* function shall return a pointer to an error message string corresponding to the error number specified by the *errnum* argument. As Crossroads define additional error numbers over and above those defined by the operating system, applications should use *xs\_strerror()* in preference to the standard *strerror()* function.

## RETURN VALUE

The *xs\_strerror()* function shall return a pointer to an error message string.

## ERRORS

No errors are defined.

## EXAMPLE

**Displaying an error message when the context cannot be initialised**.

```
void *ctx = xs_init (1, 1, 0);
if (!ctx) {
    printf ("Error occurred during xs_init(): %s\n", xs_strerror (errno));
    abort ();
}
```

## SEE ALSO

[**xs**(7)](/xs/7.md)

## AUTHORS

The Crossroads documentation was written by Martin Sustrik \<**sustrik@250bpm.com**\[1\]\> and Martin Lucina \<**martin@lucina.net**\[2\]\>.

## NOTES

- 1\.

  sustrik@250bpm.com

  mailto:sustrik@250bpm.com

- 2\.

  martin@lucina.net

  mailto:martin@lucina.net
