浏览代码

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);
                 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.
             }
             if(deviceUpdate is not null)