From ba1195294521b945d6d2eba0850b3d88bdeb6a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Mon, 30 Sep 2024 19:16:52 +0200 Subject: [PATCH] Handle exceptions in ArchiCacheable While our code does not throw them, this is public helper and we don't need to enforce from other callers exceptions-less flow. We can use it for a failure. --- ArchiSteamFarm/Helpers/ArchiCacheable.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArchiSteamFarm/Helpers/ArchiCacheable.cs b/ArchiSteamFarm/Helpers/ArchiCacheable.cs index 8ad0641ea..e64c193aa 100644 --- a/ArchiSteamFarm/Helpers/ArchiCacheable.cs +++ b/ArchiSteamFarm/Helpers/ArchiCacheable.cs @@ -87,6 +87,10 @@ public sealed class ArchiCacheable : IDisposable { } catch (OperationCanceledException e) { ASF.ArchiLogger.LogGenericDebuggingException(e); + return GetFailedValueFor(cacheFallback); + } catch (Exception e) { + ASF.ArchiLogger.LogGenericException(e); + return GetFailedValueFor(cacheFallback); } finally { InitSemaphore.Release();