1NE_GET_ERROR(3)               neon API reference               NE_GET_ERROR(3)
2
3
4

NAME

6       ne_get_error, ne_set_error - error handling for HTTP sessions
7

SYNOPSIS

9       #include <ne_session.h>
10
11
12       const char *ne_get_error (ne_sesssion *session);
13
14       void ne_set_error (ne_sesssion *session, const char *format, ...);
15
16

DESCRIPTION

18       The  session error string is used to store any human-readable error in‐
19       formation associated with any errors which occur whilst using the  HTTP
20       session.
21
22
23       The  ne_get_error  function  returns  the current session error string.
24       This string persists only until it is changed by a subsequent operation
25       on the session.
26
27
28       The  ne_set_error  function  can  be  used  to  set a new session error
29       string, using a printf-style format string interface.
30
31

EXAMPLES

33       Retrieve the current error string:
34
35       ne_session *sess = ne_session_create(...);
36       ...
37       printf("Error was: %s\n", ne_get_error(sess));
38
39
40       Set a new error string:
41
42       ne_session *sess = ne_session_create(...);
43       ...
44       ne_set_error(sess, "Response missing header %s", "somestring");
45
46

AUTHOR

48       Joe Orton <neon@webdav.org>.
49
50
51
52neon 0.25.5                     20 January 2006                NE_GET_ERROR(3)
Impressum