Fix satellite exceptions
authorkj7.sung <kj7.sung@samsung.com>
Fri, 4 Nov 2016 04:00:14 +0000 (13:00 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Fri, 4 Nov 2016 04:00:14 +0000 (13:00 +0900)
Change-Id: I3a8dca12e5a328568b476890f938346b1956905f
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
src/Tizen.Location/Tizen.Location/GpsSatellite.cs

index 4c04081..97bb78f 100755 (executable)
@@ -129,7 +129,12 @@ namespace Tizen.Location
             uint numActive;
             uint numInView = 0;
             int timestamp;
-            Interop.GpsSatellite.GetSatelliteStatus(_handle, out numActive, out numInView, out timestamp);
+            int ret = Interop.GpsSatellite.GetSatelliteStatus(_handle, out numActive, out numInView, out timestamp);
+            if (((LocationError)ret != LocationError.None))
+            {
+                Log.Error(Globals.LogTag, "Error getting the satellite" + (LocationError)ret);
+                throw LocationErrorFactory.ThrowLocationException(ret);
+            }
             return numInView;
         }