Skip to content

Commit 475bc73

Browse files
committed
add logging to Options.LoadFromServer
1 parent 4f348c2 commit 475bc73

File tree

1 file changed

+9
-1
lines changed
  • Framework/Intersect.Framework.Core/Config

1 file changed

+9
-1
lines changed

Framework/Intersect.Framework.Core/Config/Options.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,15 @@ public static void SaveToDisk()
285285

286286
public static void LoadFromServer(string data)
287287
{
288-
Instance = JsonConvert.DeserializeObject<Options>(data);
288+
try
289+
{
290+
Instance = JsonConvert.DeserializeObject<Options>(data);
291+
}
292+
catch (Exception exception)
293+
{
294+
ApplicationContext.CurrentContext.Logger.LogError(exception, "Failed to load options from server");
295+
throw;
296+
}
289297
}
290298

291299
// ReSharper disable once UnusedMember.Global

0 commit comments

Comments
 (0)