#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "qemu-common.h"
#include "qemu/error-report.h"
struct Error
if (errp == &error_abort) {
fprintf(stderr, "Unexpected error in %s() at %s:%d:\n",
err->func, err->src, err->line);
- error_report_err(err);
+ error_report("%s", error_get_pretty(err));
+ if (err->hint) {
+ error_printf("%s", err->hint->str);
+ }
abort();
}
if (errp == &error_fatal) {
va_list ap;
int saved_errno = errno;
- if (errp == NULL) {
- return;
- }
-
va_start(ap, fmt);
error_setv(errp, src, line, func, ERROR_CLASS_GENERIC_ERROR, fmt, ap,
os_errno != 0 ? strerror(os_errno) : NULL);
{
error_report("%s", error_get_pretty(err));
if (err->hint) {
- error_printf_unless_qmp("%s", err->hint->str);
+ error_printf("%s", err->hint->str);
}
error_free(err);
}
{
warn_report("%s", error_get_pretty(err));
if (err->hint) {
- error_printf_unless_qmp("%s", err->hint->str);
+ error_printf("%s", err->hint->str);
}
error_free(err);
}