.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "NE_GET_ERROR" 3 "20 January 2006" "neon 0.25.5" "neon API reference"
.SH NAME
ne_get_error, ne_set_error \- error handling for HTTP sessions
.SH "SYNOPSIS"
.ad l
.hy 0

#include <ne_session\&.h>
.sp
.HP 27
const\ char\ *\fBne_get_error\fR\ (ne_sesssion\ *\fIsession\fR);
.HP 19
void\ \fBne_set_error\fR\ (ne_sesssion\ *\fIsession\fR, const\ char\ *\fIformat\fR, \&.\&.\&.);
.ad
.hy

.SH "DESCRIPTION"

.PP
The session error string is used to store any human\-readable error information associated with any errors which occur whilst using the HTTP session\&.

.PP
The \fBne_get_error\fR function returns the current session error string\&. This string persists only until it is changed by a subsequent operation on the session\&.

.PP
The \fBne_set_error\fR function can be used to set a new session error string, using a \fBprintf\fR\-style format string interface\&.

.SH "EXAMPLES"

.PP
Retrieve the current error string:

.nf
ne_session *sess = ne_session_create(\&.\&.\&.);
\&.\&.\&.
printf("Error was: %s\\n", ne_get_error(sess));
.fi

.PP
Set a new error string:

.nf
ne_session *sess = ne_session_create(\&.\&.\&.);
\&.\&.\&.
ne_set_error(sess, "Response missing header %s", "somestring");
.fi

.SH AUTHOR
Joe Orton <neon@webdav\&.org>.
