[banshee] Dap.Mtp: change a Log.Error() to be a warning



commit 60fb8bfcdb9e67b98cd117d4461c7519d0c5cb2b
Author: Andrés G. Aragoneses <knocte gmail com>
Date:   Sat Aug 2 13:29:52 2014 +0200

    Dap.Mtp: change a Log.Error() to be a warning
    
    This happens too often to be considered an error/assertion.
    At the same time I convert it to a warning, I'm changing the
    catch to be more specific (LibMtpException instead of Exception).

 .../Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs   |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs 
b/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs
index 993223a..c75712b 100644
--- a/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs
+++ b/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs
@@ -49,7 +49,6 @@ namespace Banshee.Dap.Mtp
 {
     public class MtpSource : DapSource
     {
-
         protected override object InternalLock {
             get { return mtp_device; }
         }
@@ -146,8 +145,8 @@ namespace Banshee.Dap.Mtp
             AddDapProperty (Catalog.GetString ("Version"), mtp_device.Version);
             try {
                 AddDapProperty (Catalog.GetString ("Battery level"), String.Format ("{0:0%}", 
mtp_device.BatteryLevel/100.0));
-            } catch (Exception e) {
-                Log.Error ("Unable to get battery level from MTP device", e);
+            } catch (LibMtpException e) {
+                Log.Warning ("Unable to get battery level from MTP device", e);
             }
         }
 


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