[gnome-boxes] Throw errors from Libvirt::update_display
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Throw errors from Libvirt::update_display
- Date: Tue, 18 Sep 2012 11:03:37 +0000 (UTC)
commit 5aa069ba0bf2353b6db19002d334f21837fb0e0c
Author: Christophe Fergeau <cfergeau redhat com>
Date: Mon Sep 17 15:04:24 2012 +0200
Throw errors from Libvirt::update_display
We want LibvirtMachine::connect_display to be able to report
connection errors.
https://bugzilla.gnome.org/show_bug.cgi?id=684224
src/libvirt-machine.vala | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index d7bd089..23d03fc 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -298,7 +298,11 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
// the wizard may want to modify display properties, before connect_display()
if (display == null)
- update_display ();
+ try {
+ update_display ();
+ } catch (GLib.Error e) {
+ warning (e.message);
+ }
switch (page) {
case PropertiesPage.LOGIN:
@@ -327,14 +331,10 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
return list;
}
- private void update_display () {
+ private void update_display () throws GLib.Error {
update_domain_config ();
- try {
- display = create_display ();
- } catch (GLib.Error error) {
- warning (error.message);
- }
+ display = create_display ();
}
private Display? create_display () throws Boxes.Error {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]