GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
NE_GET_ERROR(3) neon API reference NE_GET_ERROR(3)

ne_get_error, ne_set_error - error handling for HTTP sessions

#include <ne_session.h>

const char *ne_get_error(ne_sesssion *session);

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

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.

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

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");

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

12 January 2022 neon 0.32.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.