Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
error.h File Reference

Error handling utils. More...

#include <adwaita.h>
Include dependency graph for error.h:

Go to the source code of this file.

Macros

#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)
 

Functions

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
 

Detailed Description

Error handling utils.

Definition in file error.h.

Macro Definition Documentation

◆ 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)

Definition at line 35 of file error.h.

◆ 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)

Definition at line 50 of file error.h.

Function Documentation

◆ 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.