mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Code review
This commit is contained in:
@@ -112,6 +112,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static GlobalConfig Load(string filePath) {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
Logging.LogNullError(nameof(filePath));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -120,6 +121,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
GlobalConfig globalConfig;
|
||||
|
||||
try {
|
||||
globalConfig = JsonConvert.DeserializeObject<GlobalConfig>(File.ReadAllText(filePath));
|
||||
} catch (Exception e) {
|
||||
@@ -128,6 +130,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (globalConfig == null) {
|
||||
Logging.LogNullError(nameof(globalConfig));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user