xref: /qemu/include/qapi/error-internal.h (revision 230a4894f45eac5fbd6bea8dc0dd54f84cf6c0fa)
1 /*
2  * QEMU Error Objects - struct definition
3  *
4  * Copyright IBM, Corp. 2011
5  * Copyright (C) 2011-2015 Red Hat, Inc.
6  *
7  * Authors:
8  *  Anthony Liguori   <aliguori@us.ibm.com>
9  *  Markus Armbruster <armbru@redhat.com>,
10  *
11  * This work is licensed under the terms of the GNU LGPL, version 2.  See
12  * the COPYING.LIB file in the top-level directory.
13  */
14 
15 #ifndef QAPI_ERROR_INTERNAL_H
16 
17 struct Error
18 {
19     char *msg;
20     ErrorClass err_class;
21     const char *func;
22 
23     /*
24      * src might be NUL-terminated or not.  If it is, src_len is negative.
25      * If it is not, src_len is the length.
26      */
27     const char *src;
28     int src_len;
29     int line;
30     GString *hint;
31 };
32 
33 #endif
34