[virt-tools-list] [PATCH 2/2] Improve authentication error messages
Fabiano Fidêncio
fidencio at redhat.com
Tue Sep 23 14:46:15 UTC 2014
Adding the libvirt error message to our default error message.
https://bugzilla.redhat.com/show_bug.cgi?id=1142742
---
src/virt-viewer.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/virt-viewer.c b/src/virt-viewer.c
index 3d5a363..513c0b6 100644
--- a/src/virt-viewer.c
+++ b/src/virt-viewer.c
@@ -698,8 +698,10 @@ virt_viewer_connect(VirtViewerApp *app)
oflags);
if (!priv->conn) {
if (!priv->auth_cancelled) {
- virt_viewer_app_simple_message_dialog(app, _("Unable to connect to libvirt with URI %s"),
- priv->uri ? priv->uri : _("[none]"));
+ const gchar *error_message = virGetLastErrorMessage();
+
+ virt_viewer_app_simple_message_dialog(app, _("Unable to connect to libvirt with URI %s.\nError: '%s'."),
+ priv->uri ? priv->uri : _("[none]"), error_message);
}
return -1;
--
1.9.3
More information about the virt-tools-list
mailing list