[rygel/config] Fix exception handling
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel/config] Fix exception handling
- Date: Thu, 28 May 2009 07:57:54 -0400 (EDT)
commit 24fda31840a7b007923f378ee2889061e622b585
Author: Jens Georg <mail jensge org>
Date: Wed May 27 23:13:33 2009 +0200
Fix exception handling
---
.../mediathek/rygel-mediathek-video-item.vala | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/plugins/mediathek/rygel-mediathek-video-item.vala b/src/plugins/mediathek/rygel-mediathek-video-item.vala
index 68033c9..b410b63 100644
--- a/src/plugins/mediathek/rygel-mediathek-video-item.vala
+++ b/src/plugins/mediathek/rygel-mediathek-video-item.vala
@@ -43,15 +43,21 @@ public class Rygel.MediathekVideoItem : Rygel.MediaItem {
return node->ns != null && node->ns->prefix == "media";
}
- public static MediathekAsxPlaylist? handle_content(Xml.Node *group) {
+ public static MediathekAsxPlaylist? handle_content (
+ Xml.Node *group)
+ throws MediathekVideoItemError {
MediathekAsxPlaylist asx = null;
if (namespace_ok (group)) {
Xml.Attr* attr = group->has_prop ("url");
if (attr != null) {
var url = attr->children->content;
if (url.has_suffix (".asx")) {
- asx = new MediathekAsxPlaylist (url);
- asx.parse ();
+ try {
+ asx = new MediathekAsxPlaylist (url);
+ asx.parse ();
+ } catch (MediathekAsxPlaylistError error) {
+ asx = null;
+ }
}
}
else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]