error: add global &error_warn destination

This can help debugging issues or develop, when error handling is
introduced.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-Id: <20230221124802.4103554-6-marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2023-02-21 16:47:50 +04:00
parent 6bbee5dbaa
commit 3ffef1a55c
3 changed files with 31 additions and 3 deletions

View file

@ -519,6 +519,12 @@ static inline void error_propagator_cleanup(ErrorPropagator *prop)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(ErrorPropagator, error_propagator_cleanup);
/*
* Special error destination to warn on error.
* See error_setg() and error_propagate() for details.
*/
extern Error *error_warn;
/*
* Special error destination to abort on error.
* See error_setg() and error_propagate() for details.