#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) {
"Could not open '%s'", filename);
}
-void error_vprepend(Error **errp, const char *fmt, va_list ap)
+void error_vprepend(Error *const *errp, const char *fmt, va_list ap)
{
GString *newmsg;
(*errp)->msg = g_string_free(newmsg, 0);
}
-void error_prepend(Error **errp, const char *fmt, ...)
+void error_prepend(Error *const *errp, const char *fmt, ...)
{
va_list ap;
va_end(ap);
}
-void error_append_hint(Error **errp, const char *fmt, ...)
+void error_append_hint(Error *const *errp, const char *fmt, ...)
{
va_list ap;
int saved_errno = errno;