Error handling utils.
More...
#include <adwaita.h>
Go to the source code of this file.
|
#define | HANDLE_ERROR(err, fmt, ...) |
| Shows a popup (or logs a warning if have no UI) and frees the error.
|
|
#define | HANDLE_ERROR_LITERAL(err, str) HANDLE_ERROR (err, "%s", str) |
|
#define | PROPAGATE_PREFIXED_ERROR(main_err, err, fmt, ...) |
|
#define | PROPAGATE_PREFIXED_ERROR_LITERAL(main_err, err, str) PROPAGATE_PREFIXED_ERROR (main_err, err, "%s", str) |
|
|
AdwDialog * | error_handle_prv (GError *err, const char *format,...) G_GNUC_PRINTF(2 |
| Only to be called by HANDLE_ERROR macro.
|
|
void | error_propagate_prefixed_prv (GError **main_err, GError *err, const char *format,...) G_GNUC_PRINTF(3 |
|
Error handling utils.
Definition in file error.h.
◆ HANDLE_ERROR
#define HANDLE_ERROR |
( |
| err, |
|
|
| fmt, |
|
|
| ... ) |
Value: { \
error_handle_prv (err, fmt, __VA_ARGS__); \
err = NULL; \
}
Shows a popup (or logs a warning if have no UI) and frees the error.
- Note
- Only used for non-programming errors.
Definition at line 29 of file error.h.
◆ HANDLE_ERROR_LITERAL
#define HANDLE_ERROR_LITERAL |
( |
| err, |
|
|
| str ) HANDLE_ERROR (err, "%s", str) |
◆ PROPAGATE_PREFIXED_ERROR
#define PROPAGATE_PREFIXED_ERROR |
( |
| main_err, |
|
|
| err, |
|
|
| fmt, |
|
|
| ... ) |
Value: { \
error_propagate_prefixed_prv (main_err, err, fmt, __VA_ARGS__); \
err = NULL; \
}
Definition at line 44 of file error.h.
◆ PROPAGATE_PREFIXED_ERROR_LITERAL
#define PROPAGATE_PREFIXED_ERROR_LITERAL |
( |
| main_err, |
|
|
| err, |
|
|
| str ) PROPAGATE_PREFIXED_ERROR (main_err, err, "%s", str) |
◆ error_handle_prv()
AdwDialog * error_handle_prv |
( |
GError * | err, |
|
|
const char * | format, |
|
|
| ... ) |
Only to be called by HANDLE_ERROR macro.
- Returns
- The error window, if any.