PCRE2_GET_ERROR_MESSAGE(3)
π NAME π
okay so this is the PCRE2_GET_ERROR_MESSAGE(3) page from the Library Functions Manual, and bestie we are talking about PCRE2 - Perl-compatible regular expressions (revised API). iconic. periodt. β¨
β¨ SYNOPSIS β¨
#include <pcre2.h>
int pcre2_get_error_message(int errorcode, PCRE2_UCHAR *buffer,
PCRE2_SIZE bufflen);
π DESCRIPTION π
This function hands you a textual error message for each PCRE2 error code. no cap, that's the whole vibe. Compilation errors are positive numbers; UTF formatting errors and matching errors are negative numbers. slay, but keep track of the signs. π
okay so the arguments are:
errorcodeβ an error code (positive or negative)bufferβ where to put the messagebufflenβ the length of the buffer (code units)
The function returns the length of the message in code units, excluding the trailing zero, or the negative error code PCRE2_ERROR_NOMEMORY if the buffer is too small. In this case, the returned message is truncated (but still with a trailing zero). iykyk: trailing zero still shows up. π
If errorcode does not contain a recognized error code number, the negative value PCRE2_ERROR_BADDATA is returned. so yeah, unknown code = baddata behavior, not a made-up message. π
There is a complete description of the PCRE2 native API in the pcre2api page and a description of the POSIX API in the pcre2posix page. go read those too, bestie, they're giving main character documentation energy. π¦
with love and zero cap, PCRE2 10.47, dated 24 March 2017 β signing off π«Άβ¨π
π¦ where this page comes from
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms