[gnome-boxes] machine: Better message on failure to start



commit a447d32d11e649cdf8f6a2ca175cb842a66128f4
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Sep 1 21:05:10 2014 +0100

    machine: Better message on failure to start
    
    We were showing "Connection to MACHINE_NAME failed" even when error had
    nothing to do with connection. With this patch, we say "Failed to start
    MACHINE_NAME" and show a warning on console with underlying error message.

 src/machine.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index b99bff0..6702e99 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -569,6 +569,10 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
             notification.dismissed.connect (() => {
                 window.set_state (UIState.COLLECTION);
             });
+        } catch (Boxes.Error.START_FAILED e) {
+            warning ("Failed to start %s: %s", name, e.message);
+            window.set_state (UIState.COLLECTION);
+            window.notificationbar.display_error (_("Failed to start '%s'").printf (name));
         } catch (GLib.Error e) {
             debug ("connect display failed: %s", e.message);
             window.set_state (UIState.COLLECTION);


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