summaryrefslogtreecommitdiff
path: root/qerror.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-07-20 11:08:17 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2012-08-13 13:19:47 -0300
commit5f0f0e13e1f714704d96f04050674c3102376409 (patch)
tree125a8c7c0cde76c78b8084682879748047f693cf /qerror.c
parentf2dd1d69edf0080d7d08dd3e8c7bfc6b488d59e4 (diff)
downloadqemu-5f0f0e13e1f714704d96f04050674c3102376409.tar.gz
qemu-5f0f0e13e1f714704d96f04050674c3102376409.tar.bz2
qemu-5f0f0e13e1f714704d96f04050674c3102376409.zip
qerror: QError: drop file, linenr, func
They have never been fully used and conflict with future error improvements. Also makes qerror_report() a proper function, as there's no point in having it as a macro anymore. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qerror.c')
-rw-r--r--qerror.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/qerror.c b/qerror.c
index e717496142..6f9f49c5e3 100644
--- a/qerror.c
+++ b/qerror.c
@@ -404,27 +404,14 @@ static const QErrorStringTable *get_desc_no_fail(const char *fmt)
/**
* qerror_from_info(): Create a new QError from error information
*
- * The information consists of:
- *
- * - file the file name of where the error occurred
- * - linenr the line number of where the error occurred
- * - func the function name of where the error occurred
- * - fmt JSON printf-like dictionary, there must exist keys 'class' and
- * 'data'
- * - va va_list of all arguments specified by fmt
- *
* Return strong reference.
*/
-static QError *qerror_from_info(const char *file, int linenr, const char *func,
- const char *fmt, va_list *va)
+static QError *qerror_from_info(const char *fmt, va_list *va)
{
QError *qerr;
qerr = qerror_new();
loc_save(&qerr->loc);
- qerr->linenr = linenr;
- qerr->file = file;
- qerr->func = func;
qerr->error = error_obj_from_fmt_no_fail(fmt, va);
qerr->entry = get_desc_no_fail(fmt);
@@ -545,14 +532,13 @@ static void qerror_print(QError *qerror)
QDECREF(qstring);
}
-void qerror_report_internal(const char *file, int linenr, const char *func,
- const char *fmt, ...)
+void qerror_report(const char *fmt, ...)
{
va_list va;
QError *qerror;
va_start(va, fmt);
- qerror = qerror_from_info(file, linenr, func, fmt, &va);
+ qerror = qerror_from_info(fmt, &va);
va_end(va);
if (monitor_cur_is_qmp()) {