aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-01-15 03:06:11 -0800
committerEdgar E. Iglesias <edgar.iglesias@xilinx.com>2014-01-17 09:50:11 +1000
commit732c66ce641c69702a7e7fdb73b68f0c1b583ab5 (patch)
tree476f954f211d2365e172c11f666169dd791ee92b
parent3dbe85b8404fa479ad0a75d5adb464949257f129 (diff)
Revert "error: Don't use error_report() for assertion msgs."
This reverts commit d32934c84c72f57e78d430c22974677b7bcabe5d. The original implementation before this patch makes abortive error messages much more friendly. The underlying bug that required this change is now fixed. Revert. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
-rw-r--r--util/error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/error.c b/util/error.c
index e5de34f3bb..f11f1d57a0 100644
--- a/util/error.c
+++ b/util/error.c
@@ -44,7 +44,7 @@ void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)
err->err_class = err_class;
if (errp == &error_abort) {
- fprintf(stderr, "%s\n", error_get_pretty(err));
+ error_report("%s", error_get_pretty(err));
abort();
}
@@ -80,7 +80,7 @@ void error_set_errno(Error **errp, int os_errno, ErrorClass err_class,
err->err_class = err_class;
if (errp == &error_abort) {
- fprintf(stderr, "%s\n", error_get_pretty(err));
+ error_report("%s", error_get_pretty(err));
abort();
}
@@ -125,7 +125,7 @@ void error_set_win32(Error **errp, int win32_err, ErrorClass err_class,
err->err_class = err_class;
if (errp == &error_abort) {
- fprintf(stderr, "%s\n", error_get_pretty(err));
+ error_report("%s", error_get_pretty(err));
abort();
}
@@ -171,7 +171,7 @@ void error_free(Error *err)
void error_propagate(Error **dst_err, Error *local_err)
{
if (local_err && dst_err == &error_abort) {
- fprintf(stderr, "%s\n", error_get_pretty(local_err));
+ error_report("%s", error_get_pretty(local_err));
abort();
} else if (dst_err && !*dst_err) {
*dst_err = local_err;