summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-08-29 11:20:57 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2012-09-05 15:48:57 -0300
commit75d789f8d38be693bbee3e77b558e59012e33997 (patch)
tree42275c5452b343e5b7ad6adf7a405c32a3cff7da
parent149474c93490e1c66f838391bd491db83136d91d (diff)
downloadfocaccia-qemu-75d789f8d38be693bbee3e77b558e59012e33997.tar.gz
focaccia-qemu-75d789f8d38be693bbee3e77b558e59012e33997.zip
error: add error_setg()
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-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.
  */