Переглянути джерело

Added logging to identify broken GPS Engine Location Queue

frogsoftware 1 рік тому
батько
коміт
b53a66ddcd
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      prs.server/Engines/GPS/GPSEngine.cs

+ 2 - 1
prs.server/Engines/GPS/GPSEngine.cs

@@ -109,8 +109,9 @@ public class GPSUpdateQueue
                 using var fileStream = new FileStream(filename, FileMode.Open, FileAccess.Read);
                 using var fileStream = new FileStream(filename, FileMode.Open, FileAccess.Read);
                 deviceUpdate = Serialization.ReadBinary<GPSDeviceUpdate>(fileStream, BinarySerializationSettings.Latest);
                 deviceUpdate = Serialization.ReadBinary<GPSDeviceUpdate>(fileStream, BinarySerializationSettings.Latest);
             }
             }
-            catch
+            catch (Exception e)
             {
             {
+                Logger.Send(LogType.Error, "", string.Format("Unable to retrieve file: {0}", filename));
                 // File is probably in use.
                 // File is probably in use.
             }
             }
             if(deviceUpdate is not null)
             if(deviceUpdate is not null)