Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

ne_get_error (3)

Name

ne_get_error - error handling for HTTP sessions

Synopsis

#include <ne_session.h>

const char *ne_get_error(ne_sesssion *session);

void ne_set_error(ne_sesssion *session, const char *format, ...);

Description

NE_GET_ERROR(3)               neon API reference               NE_GET_ERROR(3)



NAME
       ne_get_error, ne_set_error - error handling for HTTP sessions

SYNOPSIS
       #include <ne_session.h>

       const char *ne_get_error(ne_sesssion *session);

       void ne_set_error(ne_sesssion *session, const char *format, ...);

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

       The ne_get_error function returns the current session error string.
       This string persists only until it is changed by a subsequent operation
       on the session. If localisation was enabled at build time, and if
       necessary enabled at run-time if necessary using ne_i18n_init, the
       returned string may have been translated into the user's current
       locale.

       The ne_set_error function can be used to set a new session error
       string, using a printf-style format string interface.

RETURN VALUE
       ne_set_error returns a constant NUL-terminated string. In the default
       English locale, the returned string will not have a terminating "."
       period character.

EXAMPLES
       Retrieve the current error string:

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

       Set a new error string:

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

AUTHOR
       Joe Orton <neon@lists.manyfish.co.uk>
           Author.

COPYRIGHT
ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | library/neon     |
       +---------------+------------------+
       |Stability      | Volatile         |
       +---------------+------------------+
NOTES
       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       http://www.webdav.org/neon/neon-0.30.1.tar.gz

       Further information about this software can be found on the open source
       community website at http://www.webdav.org/neon/.



neon 0.30.1                    23 September 2014               NE_GET_ERROR(3)