On Tue, Sep 23, 2014 at 04:46:15PM +0200, Fabiano Fidêncio wrote: > 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); Concatenating error messages from underlying libraries to some generic error message generally leads to something suboptimal UI-wise. I'd tend to special case situations when we want a different error message, and to have some g_debug output withthe detailed error message if this does not exist yet. Christophe
Attachment:
pgpJ8Vnl7DFs5.pgp
Description: PGP signature
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list