diff --git a/ArchiSteamFarm/Debugging.cs b/ArchiSteamFarm/Debugging.cs index 10453f9e1..fb0cf6d80 100644 --- a/ArchiSteamFarm/Debugging.cs +++ b/ArchiSteamFarm/Debugging.cs @@ -30,7 +30,7 @@ namespace ArchiSteamFarm { internal static bool IsDebugBuild => false; #endif - internal static bool IsDebugConfigured => ASF.GlobalConfig?.Debug ?? throw new ArgumentNullException(nameof(ASF.GlobalConfig)); + internal static bool IsDebugConfigured => ASF.GlobalConfig?.Debug ?? throw new InvalidOperationException(nameof(ASF.GlobalConfig)); internal static bool IsUserDebugging => IsDebugBuild || IsDebugConfigured; diff --git a/ArchiSteamFarm/Helpers/SerializableFile.cs b/ArchiSteamFarm/Helpers/SerializableFile.cs index eb922cbfc..45b7a7a19 100644 --- a/ArchiSteamFarm/Helpers/SerializableFile.cs +++ b/ArchiSteamFarm/Helpers/SerializableFile.cs @@ -42,7 +42,7 @@ namespace ArchiSteamFarm.Helpers { protected async Task Save() { if (string.IsNullOrEmpty(FilePath)) { - throw new ArgumentNullException(nameof(FilePath)); + throw new InvalidOperationException(nameof(FilePath)); } if (ReadOnly) { diff --git a/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs b/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs index a79755599..38870d561 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/ASFController.cs @@ -62,7 +62,7 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { [ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.OK)] public ActionResult> ASFGet() { if (ASF.GlobalConfig == null) { - throw new ArgumentNullException(nameof(ASF.GlobalConfig)); + throw new InvalidOperationException(nameof(ASF.GlobalConfig)); } uint memoryUsage = (uint) GC.GetTotalMemory(false) / 1024;