mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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 <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
0a54a0ce3e
commit
59f971d451
3 changed files with 22 additions and 13 deletions
1
qerror.h
1
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__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue