2 #define PROTON_ERROR_H 1
38 #define PN_OVERFLOW (-3)
39 #define PN_UNDERFLOW (-4)
40 #define PN_STATE_ERR (-5)
41 #define PN_ARG_ERR (-6)
42 #define PN_TIMEOUT (-7)
44 #define PN_INPROGRESS (-9)
45 #define PN_OUT_OF_MEMORY (-10)
73 #define PN_RETURN_IF_ERROR(x) \
76 if (r < 0) return r; \
PN_EXTERN void pn_error_clear(pn_error_t *error)
Reset the error to a "no error" state with code == 0.
PN_EXTERN int pn_error_vformat(pn_error_t *error, int code, const char *fmt, va_list ap)
Set the code and set the text using a printf-style formatted string.
PN_EXTERN int pn_error_code(pn_error_t *error)
#define PN_EXTERN
Definition: import_export.h:53
PN_EXTERN int pn_error_set(pn_error_t *error, int code, const char *text)
Set the error code and text.
PN_EXTERN const char * pn_code(int code)
PN_EXTERN pn_error_t * pn_error(void)
PN_EXTERN int pn_error_copy(pn_error_t *error, pn_error_t *src)
PN_EXTERN int pn_error_format(pn_error_t *error, int code, const char *fmt,...)
Set the code and set the text using a printf-style formatted string.
PN_EXTERN void pn_error_free(pn_error_t *error)
struct pn_error_t pn_error_t
A pn_error_t has an int error code and some string text to describe the error.
Definition: error.h:33
PN_EXTERN const char * pn_error_text(pn_error_t *error)