[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 28/34] error: add error_get_class()
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 28/34] error: add error_get_class() |
Date: |
Wed, 1 Aug 2012 22:02:48 -0300 |
Signed-off-by: Luiz Capitulino <address@hidden>
---
error.c | 5 +++++
error.h | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/error.c b/error.c
index 6c8f7b8..15a2d06 100644
--- a/error.c
+++ b/error.c
@@ -69,6 +69,11 @@ const char *error_get_pretty(Error *err)
return err->msg;
}
+ErrorClass error_get_class(const Error *err)
+{
+ return err->err_class;
+}
+
void error_free(Error *err)
{
if (err) {
diff --git a/error.h b/error.h
index 905613a..7b85b50 100644
--- a/error.h
+++ b/error.h
@@ -46,6 +46,11 @@ Error *error_copy(const Error *err);
const char *error_get_pretty(Error *err);
/**
+ * Get the error class of an error object.
+ */
+ErrorClass error_get_class(const Error *err);
+
+/**
* Propagate an error to an indirect pointer to an error. This function will
* always transfer ownership of the error reference and handles the case where
* dst_err is NULL correctly. Errors after the first are discarded.
--
1.7.11.2.249.g31c7954.dirty
- [Qemu-devel] [PATCH 29/34] qmp: switch to the new error format on the wire, (continued)
- [Qemu-devel] [PATCH 32/34] qerror: drop qerror_table and qerror_format(), Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 27/34] qerror: add proper ErrorClass value for QERR_ macros, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 28/34] error: add error_get_class(),
Luiz Capitulino <=
- [Qemu-devel] [PATCH 25/34] qerror: qerror_table: don't use C99 struct initializers, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 34/34] error, qerror: drop QDict member, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 26/34] error, qerror: add ErrorClass argument to error functions, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 33/34] error: drop error_get_qobject()/error_set_qobject(), Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 24/34] qapi-schema: add ErrorClass enum, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 31/34] error, qerror: pass desc string to error calls, Luiz Capitulino, 2012/08/01