Name

lcb_strerror — Convert error code to textual representation

Synopsis

cc [ flag … ] file… -lcouchbase [ library … ]

#include <libcouchbase/couchbase.h>
const char * lcb_strerror(lcb_t instance, lcb_error_t error);

DESCRIPTION

lcb_strerror() converts an error code to a textual representation. The instance parameter may be NULL if you don’t have an instance to use (it is currently unused, but in the future you may get extra information).

RETURN VALUES

lcb_strerror() returns a 0-terminated string of with an textual message representing the error. The memory return is owned by libcouchbase and only valid until the next call to libcouchbase (or returning control to libcouchbase from a callback).

EXAMPLES

#include <libcouchbase/couchbase.h>
...
fprintf(stdout, "The textual string for LCB_SUCCESS is: %s\n",
        lcb_strerror(NULL, LCB_SUCCESS));
...

ATTRIBUTES

See lcb_attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE

Interface Stability

Committed

MT-Level

MT-Safe

COPYRIGHT

Copyright 2010-2013 Couchbase, Inc.

SEE ALSO

Learn more at http://www.couchbase.com/communities/c.

libcouchbase(3lib), lcb_attributes(5)