
#use wml::openssl-macros area=docs page=ERR_put_error

<title>Documents, ERR_put_error(3)</title>

<h1>ERR_put_error(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
	<LI><A HREF="#HISTORY">HISTORY</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
ERR_put_error, ERR_add_error_data - record an error

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/err.h&gt;
</PRE>
<PRE> void ERR_put_error(int lib, int func, int reason, const char *file,
         int line);
</PRE>
<PRE> void ERR_add_error_data(int num, ...);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
<CODE>ERR_put_error()</CODE> adds an error code to the thread's error
queue. It signals that the error of reason code <STRONG>reason</STRONG> occurred in function
<STRONG>func</STRONG> of library <STRONG>lib</STRONG>, in line number <STRONG>line</STRONG> of <STRONG>file</STRONG>. This function is usually called by a macro.

</P>
<P>
<CODE>ERR_add_error_data()</CODE> associates the concatenation of its <STRONG>num</STRONG> string arguments with the error code added last.

</P>
<P>
<A HREF="../crypto/ERR_load_strings.html#">ERR_load_strings(3)</A> can be used to register error strings so that the application can a
generate human-readable error messages for the error code.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
<CODE>ERR_put_error()</CODE> and <CODE>ERR_add_error_data()</CODE> return
no values.

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../crypto/err.html#">err(3)</A>, <A HREF="../crypto/ERR_load_strings.html#">ERR_load_strings(3)</A>



</P>
<P>
<HR>
<H1><A NAME="HISTORY">HISTORY</A></H1>
<P>
<CODE>ERR_put_error()</CODE> is available in all versions of SSLeay and
OpenSSL. <CODE>ERR_add_error_data()</CODE> was added in SSLeay 0.9.0.

</P>
:}

