OpenSync
0.22
|
OpenSync's error reporting facilities. More...
Enumerations | |
enum | OSyncErrorType { OSYNC_NO_ERROR = 0, OSYNC_ERROR_GENERIC = 1, OSYNC_ERROR_IO_ERROR = 2, OSYNC_ERROR_NOT_SUPPORTED = 3, OSYNC_ERROR_TIMEOUT = 4, OSYNC_ERROR_DISCONNECTED = 5, OSYNC_ERROR_FILE_NOT_FOUND = 6, OSYNC_ERROR_EXISTS = 7, OSYNC_ERROR_CONVERT = 8, OSYNC_ERROR_MISCONFIGURATION = 9, OSYNC_ERROR_INITIALIZATION = 10, OSYNC_ERROR_PARAMETER = 11, OSYNC_ERROR_EXPECTED = 12, OSYNC_ERROR_NO_CONNECTION = 13, OSYNC_ERROR_TEMPORARY = 14, OSYNC_ERROR_LOCKED = 15, OSYNC_ERROR_PLUGIN_NOT_FOUND = 16 } |
Defines the possible error types. | |
Functions | |
const char * | osync_error_get_name (OSyncError **error) |
This will return a string describing the type of the error. More... | |
void | osync_error_free (OSyncError **error) |
Frees the error so it can be reused. More... | |
osync_bool | osync_error_is_set (OSyncError **error) |
Checks if the error is set. More... | |
OSyncErrorType | osync_error_get_type (OSyncError **error) |
Returns the type of the error. More... | |
const char * | osync_error_print (OSyncError **error) |
Returns the message of the error. More... | |
void | osync_error_update (OSyncError **error, const char *format,...) |
Updates the error message. More... | |
void | osync_error_duplicate (OSyncError **target, OSyncError **source) |
Duplicates the error into the target. More... | |
void | osync_error_set (OSyncError **error, OSyncErrorType type, const char *format,...) |
Sets the error. More... | |
void | osync_error_set_type (OSyncError **error, OSyncErrorType type) |
Sets the type of an error. More... | |
OpenSync's error reporting facilities.
const char* osync_error_get_name | ( | OSyncError ** | error | ) |
This will return a string describing the type of the error.
error | A pointer to a error struct |
Definition at line 105 of file opensync_error.c.
void osync_error_free | ( | OSyncError ** | error | ) |
Frees the error so it can be reused.
error | A pointer to a error struct to free |
Definition at line 118 of file opensync_error.c.
Referenced by _new_change_receiver(), osync_change_compare(), osync_change_compare_data(), osync_change_update(), osync_env_load_groups(), osync_error_set_vargs(), osync_member_get_config(), osync_member_get_config_or_default(), and osync_module_load_dir().
osync_bool osync_error_is_set | ( | OSyncError ** | error | ) |
Checks if the error is set.
error | A pointer to a error struct to check |
Definition at line 137 of file opensync_error.c.
Referenced by osync_change_get_revision(), osync_error_duplicate(), osync_error_get_type(), osync_error_print(), osync_error_set_vargs(), osync_member_get_config(), and osync_member_get_config_or_default().
OSyncErrorType osync_error_get_type | ( | OSyncError ** | error | ) |
Returns the type of the error.
error | The error |
Definition at line 157 of file opensync_error.c.
const char* osync_error_print | ( | OSyncError ** | error | ) |
Returns the message of the error.
error | The error to print |
Definition at line 170 of file opensync_error.c.
Referenced by _new_change_receiver(), get_next_vertice_neighbour(), osengine_init(), osengine_mapping_check_timestamps(), osengine_mapping_ignore_conflict(), osengine_mapping_solve_latest(), osengine_new(), osengine_sync_and_block(), osengine_synchronize(), osync_change_compare(), osync_change_compare_data(), osync_change_convert_extension(), osync_change_convert_to_common(), osync_change_copy(), osync_change_copy_data(), osync_change_detect_objformat(), osync_change_detect_objformat_full(), osync_change_get_revision(), osync_change_update(), osync_env_initialize(), osync_env_load_formats(), osync_env_load_plugins(), osync_env_plugin_is_usable(), osync_group_save(), osync_member_get_config(), osync_member_get_config_or_default(), osync_member_initialize(), osync_member_load(), osync_member_make_random_data(), osync_member_save(), osync_member_set_configdir(), osync_module_load(), osync_module_load_dir(), osync_queue_get_message(), osync_queue_new(), and osync_try_malloc0().
void osync_error_update | ( | OSyncError ** | error, |
const char * | format, | ||
... | |||
) |
Updates the error message.
You can use this function to update the error message on a error. You can use the old error->message as a parameter for this function.
error | A pointer to a error struct to update |
format | The new message |
Definition at line 187 of file opensync_error.c.
Referenced by _new_change_receiver().
void osync_error_duplicate | ( | OSyncError ** | target, |
OSyncError ** | source | ||
) |
Duplicates the error into the target.
target | The target error to update |
source | The source error which to duplicate |
Definition at line 212 of file opensync_error.c.
Referenced by _new_change_receiver(), osengine_reset(), osengine_sync_and_block(), and osengine_wait_sync_end().
void osync_error_set | ( | OSyncError ** | error, |
OSyncErrorType | type, | ||
const char * | format, | ||
... | |||
) |
Sets the error.
You can use this function to set the error to the given type and message
error | A pointer to a error struct to set |
type | The Error type to set |
format | The message |
Definition at line 238 of file opensync_error.c.
Referenced by _new_change_receiver(), _osync_open_xml_file(), get_next_vertice_neighbour(), osengine_init(), osengine_mapping_check_timestamps(), osengine_mapping_ignore_conflict(), osengine_mapping_solve_latest(), osengine_new(), osengine_synchronize(), osync_change_convert_to_common(), osync_change_copy_data(), osync_change_detect_objformat(), osync_change_detect_objformat_full(), osync_change_get_revision(), osync_conv_set_common_format(), osync_env_finalize(), osync_env_initialize(), osync_env_load_groups(), osync_env_plugin_is_usable(), osync_file_read(), osync_file_write(), osync_group_delete(), osync_group_load(), osync_group_load_members(), osync_group_save(), osync_member_get_config(), osync_member_instance_default_plugin(), osync_member_instance_plugin(), osync_member_save(), osync_module_load(), osync_module_load_dir(), osync_plugin_get_function(), osync_queue_new(), and osync_try_malloc0().
void osync_error_set_type | ( | OSyncError ** | error, |
OSyncErrorType | type | ||
) |
Sets the type of an error.
error | A pointer to a error struct to set |
type | The Error type to set |
Definition at line 252 of file opensync_error.c.