aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2019-04-15 17:25:19 +0300
committerMarkus Armbruster <armbru@redhat.com>2019-04-17 19:15:39 +0200
commitb922c0506ad557b98ded1a0c7259844738a86e78 (patch)
tree7d673c0441b6733bb56911631b9e2cdbe52a7270 /util
parent4c8b7c8b255061ce264df21a55f69a1318d45654 (diff)
util/error: do not free error on error_abort
It would be nice to have Error object not freed away when debugging a coredump. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20190415142519.73060-1-vsementsov@virtuozzo.com> [error_printf_unless_qmp() replaced by error_printf()] Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/error.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/error.c b/util/error.c
index 712b4d4b5d..ea6d1a3d7e 100644
--- a/util/error.c
+++ b/util/error.c
@@ -34,7 +34,10 @@ static void error_handle_fatal(Error **errp, Error *err)
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) {