aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/error.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/error.c b/util/error.c
index 2ace0d8dd9..1ff6ae538b 100644
--- a/util/error.c
+++ b/util/error.c
@@ -152,6 +152,12 @@ const char *error_get_pretty(Error *err)
return err->msg;
}
+void error_report_err(Error *err)
+{
+ error_report("%s", error_get_pretty(err));
+ error_free(err);
+}
+
void error_free(Error *err)
{
if (err) {