1PCRE2_GET_ERROR_MESSAGE(3) Library Functions Manual PCRE2_GET_ERROR_MESSAGE(3)
2
3
4

NAME

6       PCRE2 - Perl-compatible regular expressions (revised API)
7

SYNOPSIS

9
10       #include <pcre2.h>
11
12       int pcre2_get_error_message(int errorcode, PCRE2_UCHAR *buffer,
13         PCRE2_SIZE bufflen);
14

DESCRIPTION

16
17       This  function  provides  a  textual error message for each PCRE2 error
18       code.  Compilation errors are positive numbers; UTF  formatting  errors
19       and matching errors are negative numbers. The arguments are:
20
21         errorcode   an error code (positive or negative)
22         buffer      where to put the message
23         bufflen     the length of the buffer (code units)
24
25       The  function returns the length of the message, excluding the trailing
26       zero, or the negative error code PCRE2_ERROR_NOMEMORY if the buffer  is
27       too  small.  In this case, the returned message is truncated (but still
28       with a trailing zero).  If errorcode  does  not  contain  a  recognized
29       error code number, the negative value PCRE2_ERROR_BADDATA is returned.
30
31       There is a complete description of the PCRE2 native API in the pcre2api
32       page and a description of the POSIX API in the pcre2posix page.
33
34
35
36PCRE2 10.22                      17 June 2016       PCRE2_GET_ERROR_MESSAGE(3)
Impressum