man-pages/man3/pcre2_get_error_message.3.html
2021-03-31 01:06:50 +01:00

72 lines
2.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PCRE2_GET_ERROR_MESSAGE</TITLE>
</HEAD><BODY>
<H1>PCRE2_GET_ERROR_MESSAGE</H1>
Section: C Library Functions (3)<BR>Updated: 24 March 2017<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
PCRE2 - Perl-compatible regular expressions (revised API)
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<B>#include &lt;<A HREF="file:///usr/include/pcre2.h">pcre2.h</A>&gt;</B>
<P>
<PRE>
<B>int pcre2_get_error_message(int </B><I>errorcode</I>, PCRE2_UCHAR *<I>buffer</I>,
<B> PCRE2_SIZE </B><I>bufflen</I>);
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
This function provides a textual error message for each PCRE2 error code.
Compilation errors are positive numbers; UTF formatting errors and matching
errors are negative numbers. The arguments are:
<P>
<BR>&nbsp;&nbsp;<I>errorcode</I>&nbsp;&nbsp;&nbsp;an&nbsp;error&nbsp;code&nbsp;(positive&nbsp;or&nbsp;negative)
<BR>&nbsp;&nbsp;<I>buffer</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;where&nbsp;to&nbsp;put&nbsp;the&nbsp;message
<BR>&nbsp;&nbsp;<I>bufflen</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;length&nbsp;of&nbsp;the&nbsp;buffer&nbsp;(code&nbsp;units)
<P>
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). If <I>errorcode</I> does not contain a recognized error code
number, the negative value PCRE2_ERROR_BADDATA is returned.
<P>
There is a complete description of the PCRE2 native API in the
<B>pcre2api</B>
page and a description of the POSIX API in the
<B>pcre2posix</B>
page.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:50 GMT, March 31, 2021
</BODY>
</HTML>