From 0faa3c3cfcb98b0ead0504bd95a6bcea9815a6a9 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Thu, 6 Dec 2012 16:29:49 +0100 Subject: [PATCH] tests: Catch an exception --- tests/rygel-http-post-test.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } -- 2.7.4