|
|
Value: str->errn = errcode; \
midgard_set_error(str->_mgd, \
MGD_GENERIC_ERROR, \
errcode, \
NULL); \
g_clear_error(&str->_mgd->err);
A simplified macro to set default error Definition at line 135 of file midgard_error.h. Referenced by midgard_get_object_by_guid(), midgard_import_object(), midgard_object_export(), midgard_object_find(), midgard_object_get_by_guid(), midgard_object_get_by_id(), midgard_object_get_by_path(), midgard_object_get_size(), midgard_object_list(), midgard_object_list_children(), midgard_object_purge(), midgard_object_set_parameter(), midgard_object_undelete(), midgard_query_builder_count(), midgard_query_builder_execute(), midgard_quota_create(), midgard_quota_size_is_reached(), and midgard_quota_update(). |
|
|
MidgardErrorGeneric enum type. This enum provides new generic error constants , and also keeps backward compatible ones.
Definition at line 41 of file midgard_error.h. |
|
|
GQuark for Midgard Error. It's used by Midgard Error implementation, and probably is not needed to use by any application.
Definition at line 22 of file midgard_error.c. |
|
||||||||||||
|
Get error message for the given error code.
Definition at line 30 of file midgard_error.c. References MGD_ERR_ACCESS_DENIED, MGD_ERR_DUPLICATE, MGD_ERR_HAS_DEPENDANTS, MGD_ERR_INTERNAL, MGD_ERR_INVALID_NAME, MGD_ERR_INVALID_OBJECT, MGD_ERR_INVALID_PROPERTY_VALUE, MGD_ERR_MISSED_DEPENDENCE, MGD_ERR_NO_MEM, MGD_ERR_NOT_CONNECTED, MGD_ERR_NOT_EXISTS, MGD_ERR_NOT_OBJECT, MGD_ERR_OBJECT_DELETED, MGD_ERR_OBJECT_EXPORTED, MGD_ERR_OBJECT_IMPORTED, MGD_ERR_OBJECT_NAME_EXISTS, MGD_ERR_OBJECT_NO_PARENT, MGD_ERR_OBJECT_NO_STORAGE, MGD_ERR_OBJECT_PURGED, MGD_ERR_OK, MGD_ERR_QUOTA, MGD_ERR_RANGE, MGD_ERR_SG_NOTFOUND, MGD_ERR_SITEGROUP_VIOLATION, and MGD_ERR_USER_DATA. Referenced by midgard_set_error(). |
|
||||||||||||||||||||||||
|
Sets internal error constant and error message.
domain parameter is optional , and can be safely defined as NULL for MGD_GENERIC_ERROR domain.Example:
void set_wrong_property(MidgardConnection *mgd, gchar *prop)
{
midgard_set_error(mgd, NULL,
MGD_ERR_INVALID_PROPERTY_VALUE,
"My application doesn't accept %s property",
prop);
}
Definition at line 151 of file midgard_error.c. References MidgardConnection::err, _midgard::errn, MidgardConnection::errnum, MidgardConnection::errstr, MidgardConnection::mgd, and midgard_error_string(). Referenced by _midgard_core_object_is_valid(), midgard_blob_read(), midgard_connection_open(), midgard_connection_set_loglevel(), midgard_object_export(), midgard_object_get_languages(), and midgard_object_undelete(). Here is the call graph for this function: ![]() |
1.4.6