aboutsummaryrefslogtreecommitdiff
path: root/error.h
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2012-09-10 15:04:36 +0200
committerAurelien Jarno <aurelien@aurel32.net>2012-09-10 15:04:36 +0200
commite22b1e9907833d72f4a959b34c5eefc3533c7711 (patch)
tree662cf685e04726bb68d8eeee94a06d694f35f95a /error.h
parenta32354e206895400d17c3de9a8df1de96d3df289 (diff)
parent0ab6b63655ba59d7c05089017acb721a44979526 (diff)
Merge branch 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable
* 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable: tcx: tcx_screen_dump(): add error handling tcx: tcx24_screen_dump(): add error handling g364fb: g364fb_screen_dump(): add error handling omap_lcdc: omap_ppm_save(): add error handling omap_lcdc: rename ppm_save() to omap_ppm_save() vga: ppm_save(): add error handling qapi: convert screendump console: vga_hw_screen_dump_ptr: take Error argument error: add error_setg() json-parser: Fix potential NULL pointer segfault qapi: Fix potential NULL pointer segfault qapi: convert sendkey monitor: move key_defs[] table and introduce two help functions qapi: add the QKeyCode enum qapi: generate list struct and visit_list for enum hmp: rename arguments monitor: rename keyname '<' to 'less' fix doc of using raw values with sendkey Add support for pretty-printing response in qmp-shell
Diffstat (limited to 'error.h')
-rw-r--r--error.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/error.h b/error.h
index 96fc20328f..da7fed399e 100644
--- a/error.h
+++ b/error.h
@@ -30,6 +30,12 @@ typedef struct Error Error;
void error_set(Error **err, ErrorClass err_class, const char *fmt, ...) GCC_FMT_ATTR(3, 4);
/**
+ * Same as error_set(), but sets a generic error
+ */
+#define error_setg(err, fmt, ...) \
+ error_set(err, ERROR_CLASS_GENERIC_ERROR, fmt, ## __VA_ARGS__)
+
+/**
* Returns true if an indirect pointer to an error is pointing to a valid
* error object.
*/