12#include "libical_ical_export.h"
51#pragma GCC visibility push(default)
99#pragma GCC visibility pop
132#define icalerrno (*(icalerror_icalerrno()))
177#define icalerror_warn(message) \
179 icalerrprintf("%s(), %s:%d: %s\n", __FUNCTION__, __FILE__, __LINE__, message); \
182#define icalerror_warn(message) \
184 icalerrprintf("%s:%d: %s\n", __FILE__, __LINE__, message); \
331#define icalerror_check_value_type(value, type) ;
332#define icalerror_check_property_type(value, type) ;
333#define icalerror_check_parameter_type(value, type) ;
334#define icalerror_check_component_type(value, type) ;
350#define icalerror_assert(test, message) \
351 if (icalerror_get_errors_are_fatal() && !(test)) { \
352 icalerrprintf("%s(), %s:%d: %s\n", __FUNCTION__, __FILE__, __LINE__, message); \
353 icalerror_stop_here(); \
357#define icalerror_assert(test, message) \
358 if (icalerror_get_errors_are_fatal() && !(test)) { \
359 icalerrprintf("%s:%d: %s\n", __FILE__, __LINE__, message); \
360 icalerror_stop_here(); \
383#define icalerror_check_arg(test, arg) \
385 icalerror_set_errno(ICAL_BADARG_ERROR); \
407#define icalerror_check_arg_rv(test, arg) \
409 icalerror_set_errno(ICAL_BADARG_ERROR); \
433#define icalerror_check_arg_rz(test, arg) \
435 icalerror_set_errno(ICAL_BADARG_ERROR); \
460#define icalerror_check_arg_re(test, arg, error) \
462 icalerror_stop_here(); \
488#define icalerror_check_arg_rx(test, arg, x) \
490 icalerror_set_errno(ICAL_BADARG_ERROR); \
void icalerror_crash_here(void)
Triggered to abort the process.
Definition icalerror.c:73
void icalerror_set_errors_are_fatal(bool fatal)
Change if errors are fatal.
Definition icalerror.c:100
icalerrorenum * icalerror_icalerrno(void)
Returns the current icalerrno value.
Definition icalerror.c:39
bool icalerror_get_errors_are_fatal(void)
Determine if errors are fatal.
Definition icalerror.c:105
icalerrorstate
Determine if an error is fatal or non-fatal.
Definition icalerror.h:207
@ ICAL_ERROR_UNKNOWN
Definition icalerror.h:218
@ ICAL_ERROR_FATAL
Definition icalerror.h:209
@ ICAL_ERROR_DEFAULT
Definition icalerror.h:215
@ ICAL_ERROR_NONFATAL
Definition icalerror.h:212
const char * icalerror_perror(void)
Returns the description string for the current error in icalerrno.
Definition icalerror.c:197
icalerrorstate icalerror_get_error_state(icalerrorenum error)
Gets the error state (severity) for a given error.
Definition icalerror.c:222
icalerrorenum
Represents the different types of errors that can be triggered in libical.
Definition icalerror.h:64
@ ICAL_NEWFAILED_ERROR
Definition icalerror.h:72
@ ICAL_BADARG_ERROR
Definition icalerror.h:69
@ ICAL_FILE_ERROR
Definition icalerror.h:87
@ ICAL_ALLOCATION_ERROR
Definition icalerror.h:75
@ ICAL_INTERNAL_ERROR
Definition icalerror.h:84
@ ICAL_NO_ERROR
Definition icalerror.h:66
@ ICAL_MALFORMEDDATA_ERROR
Definition icalerror.h:78
@ ICAL_UNKNOWN_ERROR
Definition icalerror.h:96
@ ICAL_PARSE_ERROR
Definition icalerror.h:81
@ ICAL_UNIMPLEMENTED_ERROR
Definition icalerror.h:93
@ ICAL_USAGE_ERROR
Definition icalerror.h:90
void icalerror_backtrace(void)
Prints backtrace.
Definition icalerror.c:248
void icalerror_set_error_state(icalerrorenum error, icalerrorstate state)
Sets the icalerrorstate for a given icalerrorenum error.
Definition icalerror.c:211
const char * icalerror_strerror(icalerrorenum e)
Finds the description string for error.
Definition icalerror.c:235
void icalerror_set_errno(icalerrorenum x)
Sets the icalerrno to a given error.
Definition icalerror.c:110
void icalerror_restore(const char *error, icalerrorstate es)
Definition icalerror.c:202
void icalerror_stop_here(void)
Triggered before any error is called.
Definition icalerror.c:68
icalerrorenum icalerror_error_from_string(const char *str)
Reads an error from a string.
Definition icalerror.c:169
void icalerror_clear_errno(void)
Resets icalerrno to ICAL_NO_ERROR.
Definition icalerror.c:93
icalerrorstate icalerror_supress(const char *error)
Suppresses a given error.
Definition icalerror.c:182