[rygel] tests: Catch an exception



commit 0faa3c3cfcb98b0ead0504bd95a6bcea9815a6a9
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Dec 6 16:29:49 2012 +0100

    tests: Catch an exception

 tests/rygel-http-post-test.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/tests/rygel-http-post-test.vala b/tests/rygel-http-post-test.vala
index af8acdd..eccbaa3 100644
--- a/tests/rygel-http-post-test.vala
+++ b/tests/rygel-http-post-test.vala
@@ -353,7 +353,12 @@ public class Rygel.MediaContainer : Rygel.MediaObject {
         this.error = false;
         this.id = "TesContainer";
 
-        this.monitor = this.file.monitor_file (FileMonitorFlags.NONE);
+        try {
+            this.monitor = this.file.monitor_file (FileMonitorFlags.NONE);
+        } catch (GLib.Error error) {
+            assert_not_reached ();
+        }
+
         this.monitor.changed.connect (this.on_file_changed);
     }
 



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