qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]