[banshee] [Banshee.Hardware] Handle exceptions (bgo#613173)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Banshee.Hardware] Handle exceptions (bgo#613173)
- Date: Thu, 18 Mar 2010 23:54:58 +0000 (UTC)
commit a3bda57f28aab7c8eed2c723e65c322834c03fc6
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Mar 18 16:54:29 2010 -0700
[Banshee.Hardware] Handle exceptions (bgo#613173)
.../Banshee.Hardware/HardwareManager.cs | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Hardware/HardwareManager.cs b/src/Core/Banshee.Services/Banshee.Hardware/HardwareManager.cs
index 6ee536e..d21dd06 100644
--- a/src/Core/Banshee.Services/Banshee.Hardware/HardwareManager.cs
+++ b/src/Core/Banshee.Services/Banshee.Hardware/HardwareManager.cs
@@ -198,9 +198,13 @@ namespace Banshee.Hardware
private T CastToCustomDevice<T> (T device) where T : class, IDevice
{
foreach (ICustomDeviceProvider provider in custom_device_providers.Values) {
- T new_device = provider.GetCustomDevice (device);
- if (new_device != device) {
- return new_device;
+ try {
+ T new_device = provider.GetCustomDevice (device);
+ if (new_device != device) {
+ return new_device;
+ }
+ } catch (Exception e) {
+ Log.Exception ("Exception casting device", e);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]