Revision 0167f772 qerror.c
b/qerror.c | ||
---|---|---|
9 | 9 |
* This work is licensed under the terms of the GNU LGPL, version 2.1 or later. |
10 | 10 |
* See the COPYING.LIB file in the top-level directory. |
11 | 11 |
*/ |
12 |
|
|
13 |
#include "monitor.h" |
|
12 | 14 |
#include "qjson.h" |
13 | 15 |
#include "qerror.h" |
14 | 16 |
#include "qemu-common.h" |
... | ... | |
377 | 379 |
QDECREF(qstring); |
378 | 380 |
} |
379 | 381 |
|
382 |
void qerror_report_internal(const char *file, int linenr, const char *func, |
|
383 |
const char *fmt, ...) |
|
384 |
{ |
|
385 |
va_list va; |
|
386 |
QError *qerror; |
|
387 |
|
|
388 |
va_start(va, fmt); |
|
389 |
qerror = qerror_from_info(file, linenr, func, fmt, &va); |
|
390 |
va_end(va); |
|
391 |
|
|
392 |
if (monitor_cur_is_qmp()) { |
|
393 |
monitor_set_error(cur_mon, qerror); |
|
394 |
} else { |
|
395 |
qerror_print(qerror); |
|
396 |
QDECREF(qerror); |
|
397 |
} |
|
398 |
} |
|
399 |
|
|
380 | 400 |
/** |
381 | 401 |
* qobject_to_qerror(): Convert a QObject into a QError |
382 | 402 |
*/ |
Also available in: Unified diff