Statistics
| Branch: | Revision:

root / error.c @ 992aeb8e

History | View | Annotate | Download (2 kB)

# Date Author Comment
7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

Signed-off-by: Paolo Bonzini <>

680d16dc 10/23/2012 02:54 pm Paolo Bonzini

error: add error_set_errno and error_setg_errno

These functions help maintaining homogeneous formatting of error
messages that include strerror values.

Acked-by: Luiz Capitulino <>
Signed-off-by: Paolo Bonzini <>

7795b166 08/13/2012 08:17 pm Luiz Capitulino

error: drop error_get_qobject()/error_set_qobject()

error_get_qobject() is unused since last commit, error_set_qobject()
has never been used. Also drops error_int.h.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Markus Armbruster <>

df1e608a 08/13/2012 08:17 pm Luiz Capitulino

error, qerror: pass desc string to error calls

This commit changes all QERR_ macros to contain a human message (ie.
the desc string found in qerr_table[]) instead of a json dictionary
in string format.

Before this commit, error_set() and qerror_report() would receive...

6d3f0dbb 08/13/2012 08:17 pm Luiz Capitulino

error, qerror: drop QDict member

Used to store error information, but it's unused now.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Markus Armbruster <>

a8cb2d30 08/13/2012 08:17 pm Luiz Capitulino

error: drop unused functions

Besides being unused, they operate on the current error format,
which is going to be replaced soon.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Markus Armbruster <>

ea25fbca 08/13/2012 07:21 pm Luiz Capitulino

error: add error_get_class()

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Markus Armbruster <>

13f59ae8 08/13/2012 07:21 pm Luiz Capitulino

error, qerror: add ErrorClass argument to error functions

The new argument is added to functions qerror_report() and error_set().
It's stored in Error and QError. qerror_report_err() is also updated to
take care of it.

The QERR_ macros are changed to contain a place holder value for the...

dd7520f0 08/13/2012 07:20 pm Luiz Capitulino

error: don't delay error message construction

Today, the error message is only constructed when it's used. This commit
changes that to construct the error message when the error object is
built (ie. when the error is reported).

This simplifies the Error object....

2b38cf2e 08/13/2012 07:19 pm Luiz Capitulino

qerror: qerror_format(): return an allocated string

Simplifies current and future users.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Markus Armbruster <>

d195325b 07/23/2012 01:55 pm Paolo Bonzini

qapi: fix error propagation

Don't overwrite / leak previously set errors.
Make traversal cope with missing mandatory sub-structs.
Don't try to end a container that could not be started.

v1->v2:
- unchanged

v2->v3:
- instead of examining, assert that we never overwrite errors with...

0ed6dc1a 04/20/2012 03:14 pm Amos Kong

error.c: don't return value for void function

It is invalid to return a value from a function
returning void.

[C99 6.8.6.4 says "A return statement with an expression shall not
appear in a function whose return type is void" but gcc 4.6.3 with QEMU
compile flags does not complain. It's still worth fixing this. Stefan]...

79020cfc 03/15/2012 03:39 pm Luiz Capitulino

Error: Introduce error_copy()

Signed-off-by: Luiz Capitulino <>

f795e743 10/27/2011 04:48 pm Luiz Capitulino

Drop qemu-objects.h from modules that don't require it

Previous commits dropped most qobjects usage from qemu modules
(now they are a low level interface used by the QAPI). However,
some modules still include the qemu-objects.h header file.

This commit drops qemu-objects.h from some of those modules...

acceb4d9 10/04/2011 05:00 pm Anthony Liguori

error: let error_is_type take a NULL error

Reported-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

e4ea5e2d 06/16/2011 05:42 pm Stefan Weil

error framework: Fix compilation for w32/w64

The declaration of function error_set() should use macro GCC_FMT_ATTR
instead of gcc's format printf attribute.

For w32/w64, both declarations are different and GCC_FMT_ATTR is needed.
Compilation for w64 even failed with the original code because mingw64...

d5ec4f27 06/07/2011 09:52 pm Luiz Capitulino

Introduce the new error framework

New error-handling framework that allows for exception-like error
propagation.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Michael Roth <>
Signed-off-by: Anthony Liguori <>