ZIP_ERROR_GET(3)
π ZIP_ERROR_GET(3) π
okay bestie, welcome to the Library Functions Manual page for ZIP_ERROR_GET β yes that's the manual name, and yes we're doing this together, hand in hand, because you deserve to know what's up π«Ά
β¨ NAME β¨
zip_error_get, zip_file_error_get β grab the error codes for an archive or a file, but likeβ¦ the obsolete interface way π΅π
π LIBRARY π
libzip (-lzip) β she's linked, she's loaded, she's ready π
πΈ SYNOPSIS πΈ
#include <zip.h>
void
zip_error_get(zip_t *archive, int *zep, int *sep);
void
zip_file_error_get(zip_file_t *file, int *zep, int *sep);
π DESCRIPTION π
okay so real talk: zip_error_get() and zip_file_error_get() are deprecated. not like "kinda old" deprecated, like actually deprecated, and the universe has moved on. please use zip_error_code_system(3), zip_error_code_zip(3), zip_file_get_error(3), and zip_get_error(3) instead. no cap. π§
for zip_error_get(), you're replacing this:
int ze, se;
zip_error_get(za, &ze, &se);
with this:
int ze, se;
zip_error_t *error = zip_get_error(za);
ze = zip_error_code_zip(error);
se = zip_error_code_system(error);
and for zip_file_error_get(), the glow-up goes like this β replace:
int ze, se;
zip_file_error_get(zf, &ze, &se);
with:
int ze, se;
zip_error_t *error = zip_file_get_error(zf);
ze = zip_error_code_zip(error);
se = zip_error_code_system(error);
see how much cleaner that is?? it's giving β¨modern codebaseβ¨, it's giving main character energy, it's giving "my error handling has a type now". obsessed honestly π
π SEE ALSO π
libzip(3), zip_error_code_system(3), zip_error_code_zip(3), zip_file_get_error(3), zip_get_error(3)
go read those, they're the upgrade path and they ate π
π HISTORY π
zip_error_get() was added in libzip 0.6. it was deprecated in libzip 1.0 β use zip_get_error(), zip_error_code_zip(), / zip_error_code_system() instead. (yes the slash is in the original, i'm not touching it, i'm just the messenger π«‘)
zip_file_error_get() was added in libzip 0.6. it was deprecated in libzip 1.0 β use zip_file_get_error(), zip_error_code_zip(), / zip_error_code_system() instead.
π AUTHORS π
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β the literal icons who wrote this, we stan πβ
and that's the whole page bestie!! this one came from the Debian crew, dated December 18, 2017, and it's sitting at the very bottom of ZIP_ERROR_GET(3) like a lil signature π go forth, migrate off the deprecated functions, and slay your error handling πβ¨π
π¦ where this page comes from
- arch rolling: libzip 1.11.4-1 Β· BSD
- debian trixie: libzip-dev 1.11.3-2 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- nixpkgs unstable: libzip 1.11.4
- ubuntu questing: libzip-dev 1.11.3-2
- ubuntu resolute: libzip-dev 1.11.4-2 Β· BSD-3-Clause
- ubuntu stonking: libzip-dev 1.11.4-2build1 Β· BSD-3-Clause
- Copyright (C) 2004-2017 Dieter Baron and Thomas Klausner
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms