---
name: "__set_liberror"
section: "3pub"
platform: "linux"
package: "publib-dev"
version: "0.40-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/__set_liberror"
---

# \_\_set\_liberror(3pub)

modify error handling for publib

## NAME

\_\_set\_liberror - modify error handling for publib

## SYNOPSIS

\#include \<publib.h\>

void \_\_set\_liberror(enum \_\_liberror);

## DESCRIPTION

Unless the documentation for the function specifies otherwise, the default action when a library function notices an error is to abort whatever it was doing and return an error indication.  It is possible to change this behaviour with *\_\_set\_liberror(3)*.  The argument should be a bitwise OR of the following values:

```
	__abort_on_error
	__exit_on_error
	__complain_on_error

Note that __abort_on_error and __exit_on_error are
mutually exclusive, only use one.
```

## SEE ALSO

publib(3)

## AUTHOR

Lars Wirzenius (lars.wirzenius@helsinki.fi)
