[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [libosinfo 1/2] Set GError even if libvirt error is unknown



From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>

---
 libvirt-glib/libvirt-glib-error.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libvirt-glib/libvirt-glib-error.c b/libvirt-glib/libvirt-glib-error.c
index f59b464..0319687 100644
--- a/libvirt-glib/libvirt-glib-error.c
+++ b/libvirt-glib/libvirt-glib-error.c
@@ -80,7 +80,10 @@ GError *gvir_error_new_literal(GQuark domain,
     virErrorPtr verr = virGetLastError();
 
     if (!verr)
-        return NULL;
+        return g_error_new(domain,
+                           code,
+                           "%s",
+                           message);
 
     if (message)
         return g_error_new(domain,
-- 
1.7.6.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]