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 in code units, excluding
26       the trailing zero, or the negative error code  PCRE2_ERROR_NOMEMORY  if
27       the  buffer  is  too small. In this case, the returned message is trun‐
28       cated (but still with a trailing zero). If errorcode does not contain a
29       recognized error code number, the negative value PCRE2_ERROR_BADDATA is
30       returned.
31
32       There is a complete description of the PCRE2 native API in the pcre2api
33       page and a description of the POSIX API in the pcre2posix page.
34
35
36
37PCRE2 10.30                      24 March 2017      PCRE2_GET_ERROR_MESSAGE(3)
Impressum