[banshee] Mtp: Check error stack on battery status error



commit 33a6f76d510199ab64256a8d30aadb4cfc814136
Author: Nicholas Little <arealityfarbetween googlemail com>
Date:   Thu Jul 31 14:40:29 2014 +0100

    Mtp: Check error stack on battery status error

 src/Libraries/Mtp/Mtp/MtpDevice.cs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/Libraries/Mtp/Mtp/MtpDevice.cs b/src/Libraries/Mtp/Mtp/MtpDevice.cs
index db2ba99..155132d 100644
--- a/src/Libraries/Mtp/Mtp/MtpDevice.cs
+++ b/src/Libraries/Mtp/Mtp/MtpDevice.cs
@@ -307,8 +307,10 @@ namespace Mtp
         internal static void GetBatteryLevel (MtpDeviceHandle handle, out ushort maxLevel, out ushort 
currentLevel)
         {
             int result = LIBMTP_Get_Batterylevel (handle, out maxLevel, out currentLevel);
-            if (result != 0)
+            if (result != 0) {
+                LibMtpException.CheckErrorStack (handle);
                 throw new LibMtpException (ErrorCode.General, "Could not retrieve battery stats");
+            }
         }
 
         internal static void GetConnectedDevices (out IntPtr list)


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