[banshee] Mpris: Catch exceptions on d-bus signal firing
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Mpris: Catch exceptions on d-bus signal firing
- Date: Sun, 30 Jan 2011 21:08:51 +0000 (UTC)
commit 0db1d0f7dacff6cbbce0c5e1b72d5a3c2cd0b11c
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Sun Jan 30 21:59:55 2011 +0100
Mpris: Catch exceptions on d-bus signal firing
This prevents d-bus issues to crash Banshee on start-up. But those
issues still need to be dealt with.
.../Banshee.Mpris/Banshee.Mpris/MediaPlayer.cs | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/Extensions/Banshee.Mpris/Banshee.Mpris/MediaPlayer.cs b/src/Extensions/Banshee.Mpris/Banshee.Mpris/MediaPlayer.cs
index d433482..af28a85 100644
--- a/src/Extensions/Banshee.Mpris/Banshee.Mpris/MediaPlayer.cs
+++ b/src/Extensions/Banshee.Mpris/Banshee.Mpris/MediaPlayer.cs
@@ -446,7 +446,11 @@ namespace Banshee.Mpris
PropertiesChangedHandler handler = properties_changed;
if (handler != null) {
lock (changed_properties) {
- handler (interface_name, changed_properties, invalidated_properties.ToArray ());
+ try {
+ handler (interface_name, changed_properties, invalidated_properties.ToArray ());
+ } catch (Exception e) {
+ Log.Exception (e);
+ }
changed_properties.Clear ();
invalidated_properties.Clear ();
}
@@ -465,7 +469,11 @@ namespace Banshee.Mpris
{
PlaylistChangedHandler playlist_handler = playlist_changed;
if (playlist_handler != null) {
- playlist_handler (BuildPlaylistFromSource (source));
+ try {
+ playlist_handler (BuildPlaylistFromSource (source));
+ } catch (Exception e) {
+ Log.Exception (e);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]