---
name: "pack_ferror"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pack_ferror/3alleg4"
---

# pack\_ferror(3alleg4)

Tells if an error occurred during an operation on the stream. Allegro game programming library.

## NAME

pack\_ferror - Tells if an error occurred during an operation on the stream. Allegro game programming library.

## SYNOPSIS

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

**int pack\_ferror(PACKFILE \*f);**

## DESCRIPTION

Since EOF is used to report errors by some functions, it's often better to use the pack\_feof() function to check explicitly for end of file and pack\_ferror() to check for errors. Both functions check indicators that are part of the internal state of the stream to detect correctly the different situations.

## RETURN VALUE

Returns nonzero if the error indicator for the stream is set, meaning that an error has occurred during a previous operation on the stream.

## SEE ALSO

**pack\_fopen**(3alleg4), **pack\_fopen\_chunk**(3alleg4)
