Zrythm v2.0.0-DEV
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
9
10#ifndef __UTILS_ERROR_H__
11#define __UTILS_ERROR_H__
12
18AdwDialog *
19error_handle_prv (GError * err, const char * format, ...) G_GNUC_PRINTF (2, 3);
20
27#define HANDLE_ERROR(err, fmt, ...) \
28 { \
29 error_handle_prv (err, fmt, __VA_ARGS__); \
30 err = NULL; \
31 }
32
33#define HANDLE_ERROR_LITERAL(err, str) HANDLE_ERROR (err, "%s", str)
34
35void
36error_propagate_prefixed_prv (
37 GError ** main_err,
38 GError * err,
39 const char * format,
40 ...) G_GNUC_PRINTF (3, 4);
41
42#define PROPAGATE_PREFIXED_ERROR(main_err, err, fmt, ...) \
43 { \
44 error_propagate_prefixed_prv (main_err, err, fmt, __VA_ARGS__); \
45 err = NULL; \
46 }
47
48#define PROPAGATE_PREFIXED_ERROR_LITERAL(main_err, err, str) \
49 PROPAGATE_PREFIXED_ERROR (main_err, err, "%s", str)
50
51#endif
AdwDialog * error_handle_prv(GError *err, const char *format,...) G_GNUC_PRINTF(2
Only to be called by HANDLE_ERROR macro.