Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2020-2024 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __UTILS_ERROR_H__
11#define __UTILS_ERROR_H__
12
13#include <adwaita.h>
14
20AdwDialog *
21error_handle_prv (GError * err, const char * format, ...) G_GNUC_PRINTF (2, 3);
22
29#define HANDLE_ERROR(err, fmt, ...) \
30 { \
31 error_handle_prv (err, fmt, __VA_ARGS__); \
32 err = NULL; \
33 }
34
35#define HANDLE_ERROR_LITERAL(err, str) HANDLE_ERROR (err, "%s", str)
36
37void
38error_propagate_prefixed_prv (
39 GError ** main_err,
40 GError * err,
41 const char * format,
42 ...) G_GNUC_PRINTF (3, 4);
43
44#define PROPAGATE_PREFIXED_ERROR(main_err, err, fmt, ...) \
45 { \
46 error_propagate_prefixed_prv (main_err, err, fmt, __VA_ARGS__); \
47 err = NULL; \
48 }
49
50#define PROPAGATE_PREFIXED_ERROR_LITERAL(main_err, err, str) \
51 PROPAGATE_PREFIXED_ERROR (main_err, err, "%s", str)
52
53#endif
AdwDialog * error_handle_prv(GError *err, const char *format,...) G_GNUC_PRINTF(2
Only to be called by HANDLE_ERROR macro.