mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qerror: don't delay error message construction
Today, the error message is only constructed when it's used. This commit changes qerror to construct the error message when the error object is built (ie. when the error is reported). This eliminates the need of storing a pointer to qerror_table[], which will be dropped soon, and also simplifies the code. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
2b38cf2e03
commit
18da7c0f1f
2 changed files with 5 additions and 26 deletions
2
qerror.h
2
qerror.h
|
@ -27,7 +27,7 @@ typedef struct QError {
|
|||
QObject_HEAD;
|
||||
QDict *error;
|
||||
Location loc;
|
||||
const QErrorStringTable *entry;
|
||||
char *err_msg;
|
||||
} QError;
|
||||
|
||||
QString *qerror_human(const QError *qerror);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue