Fix satellite exceptions
[platform/core/csapi/tizenfx.git] / 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;
         }