i-cal-error

## i-cal-error i-cal-error |

## Synopsis

    enum                ICalErrorEnum;
    enum                ICalErrorState;
    void                i_cal_error_stop_here               (void);
    void                i_cal_error_crash_here              (void);
    ICalErrorEnum       i_cal_errno_return                  (void);
    void                i_cal_error_clear_errno             (void);
    const gchar *       i_cal_error_strerror                (ICalErrorEnum e);
    const gchar *       i_cal_error_perror                  (void);
    void                i_cal_bt                            (void);
    void                i_cal_error_set_error_state         (ICalErrorEnum error,
                                                             ICalErrorState state);
    ICalErrorState      i_cal_error_get_error_state         (ICalErrorEnum error);
    void                i_cal_error_set_errno               (ICalErrorEnum x);
    ICalErrorState      i_cal_error_supress                 (const gchar *error);
    void                i_cal_error_restore                 (const gchar *error,
                                                             ICalErrorState es);

## Description

## Details

### enum ICalErrorEnum

    typedef enum {
    	I_CAL_NO_ERROR = ICAL_NO_ERROR,
    	I_CAL_BADARG_ERROR = ICAL_BADARG_ERROR,
    	I_CAL_NEWFAILED_ERROR = ICAL_NEWFAILED_ERROR,
    	I_CAL_ALLOCATION_ERROR = ICAL_ALLOCATION_ERROR,
    	I_CAL_MALFORMEDDATA_ERROR = ICAL_MALFORMEDDATA_ERROR,
    	I_CAL_PARSE_ERROR = ICAL_PARSE_ERROR,
    	I_CAL_INTERNAL_ERROR = ICAL_INTERNAL_ERROR,
    	I_CAL_FILE_ERROR = ICAL_FILE_ERROR,
    	I_CAL_USAGE_ERROR = ICAL_USAGE_ERROR,
    	I_CAL_UNIMPLEMENTED_ERROR = ICAL_UNIMPLEMENTED_ERROR,
    	I_CAL_UNKNOWN_ERROR = ICAL_UNKNOWN_ERROR
    } ICalErrorEnum;

`I_CAL_NO_ERROR` |
`I_CAL_BADARG_ERROR` |
`I_CAL_NEWFAILED_ERROR` |
`I_CAL_ALLOCATION_ERROR` |
`I_CAL_MALFORMEDDATA_ERROR` |
`I_CAL_PARSE_ERROR` |
`I_CAL_INTERNAL_ERROR` |
`I_CAL_FILE_ERROR` |
`I_CAL_USAGE_ERROR` |
`I_CAL_UNIMPLEMENTED_ERROR` |
`I_CAL_UNKNOWN_ERROR` |

### enum ICalErrorState

    typedef enum {
    	I_CAL_ERROR_FATAL = ICAL_ERROR_FATAL,
    	I_CAL_ERROR_NONFATAL = ICAL_ERROR_NONFATAL,
    	I_CAL_ERROR_DEFAULT = ICAL_ERROR_DEFAULT,
    	I_CAL_ERROR_UNKNOWN = ICAL_ERROR_UNKNOWN
    } ICalErrorState;

`I_CAL_ERROR_FATAL` |
`I_CAL_ERROR_NONFATAL` |
`I_CAL_ERROR_DEFAULT` |
`I_CAL_ERROR_UNKNOWN` |

### i_cal_error_stop_here ()

    void                i_cal_error_stop_here               (void);

Since 1.0

### i_cal_error_crash_here ()

    void                i_cal_error_crash_here              (void);

Shout out the errors to the compiler

Since 1.0

### i_cal_errno_return ()

    ICalErrorEnum       i_cal_errno_return                  (void);

Return the error stored in the library. If no error, return ICAL_NO_ERROR.

Returns : | Return the error happened. [transfer full]

Since 1.0

### i_cal_error_clear_errno ()

    void                i_cal_error_clear_errno             (void);

Since 1.0

### i_cal_error_strerror ()

    const gchar *       i_cal_error_strerror                (ICalErrorEnum e);

Translate the ICalErrorEnum to the string representation

`e` : | The ICalErrorEnum to be translated
Returns : | The string representation of `e`. [transfer none]

Since 1.0

### i_cal_error_perror ()

    const gchar *       i_cal_error_perror                  (void);

Get the ICalErrorEnum in the string representation. This method called the icalerrorno_return to get the current error

Returns : | The string representation of the current error. [transfer none]

Since 1.0

### i_cal_bt ()

    void                i_cal_bt                            (void);

Since 1.0

### i_cal_error_set_error_state ()

    void                i_cal_error_set_error_state         (ICalErrorEnum error,
                                                             ICalErrorState state);

Set the state to the corresponding error in the library.

`error` : | The error enum
`state` : | The error state

Since 1.0

### i_cal_error_get_error_state ()

    ICalErrorState      i_cal_error_get_error_state         (ICalErrorEnum error);

Get the state of an error

`error` : | The error to be checked
Returns : | The state of the `error`

Since 1.0

### i_cal_error_set_errno ()

    void                i_cal_error_set_errno               (ICalErrorEnum x);

Set the errno.

`x` : | The error to be set

Since 1.0

### i_cal_error_supress ()

    ICalErrorState      i_cal_error_supress                 (const gchar *error);

Suppress the error

`error` : | The error to be suppressed
Returns : | The error state suppressed

Since 1.0

### i_cal_error_restore ()

    void                i_cal_error_restore                 (const gchar *error,
                                                             ICalErrorState es);

Restore the error to specified state

`error` : | The error to be restored
`es` : | The error state to be restored

Since 1.0