From 59f971d451fbabee3194bb565f40846398ee6e6f Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 14 Feb 2012 10:19:53 +0100 Subject: qdev: print error message before aborting qdev_prop_set_* functions are always called by machine init functions that should know what they're doing, so they abort on error. Still, an assert(!errp) does not aid debugging. Print an error before aborting. Signed-off-by: Paolo Bonzini Signed-off-by: Blue Swirl --- qerror.h | 1 + 1 file changed, 1 insertion(+) (limited to 'qerror.h') diff --git a/qerror.h b/qerror.h index e8718bfbab..e26c63598d 100644 --- a/qerror.h +++ b/qerror.h @@ -41,6 +41,7 @@ void qerror_print(QError *qerror); void qerror_report_internal(const char *file, int linenr, const char *func, const char *fmt, ...) GCC_FMT_ATTR(4, 5); void qerror_report_err(Error *err); +void assert_no_error(Error *err); QString *qerror_format(const char *fmt, QDict *error); #define qerror_report(fmt, ...) \ qerror_report_internal(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__) -- cgit v1.2.3