mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 06:10:11 +01:00
shared: add nm_utils_error_set*() helper macros
Add helper macros to type less.
This commit is contained in:
parent
0d3bb64008
commit
0ee782d03e
1 changed files with 9 additions and 0 deletions
|
|
@ -403,6 +403,15 @@ void nm_utils_error_set_cancelled (GError **error,
|
|||
gboolean nm_utils_error_is_cancelled (GError *error,
|
||||
gboolean consider_is_disposing);
|
||||
|
||||
static inline void
|
||||
nm_utils_error_set_literal (GError **error, int error_code, const char *literal)
|
||||
{
|
||||
g_set_error_literal (error, NM_UTILS_ERROR, error_code, literal);
|
||||
}
|
||||
|
||||
#define nm_utils_error_set(error, error_code, ...) \
|
||||
g_set_error ((error), NM_UTILS_ERROR, error_code, __VA_ARGS__)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
gboolean nm_g_object_set_property (GObject *object,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue