Skip to content

Commit

Permalink
Fixed deserialize and catch handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
tznind committed Jan 26, 2022
1 parent c277a36 commit 73e61d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,22 @@
catch (Exception ex)
{
Console.WriteLine($"Failed to get or store {ConfigFile} settings from user: {ex}");
return;
}
}
else
{
try
{
var deserialize = new Deserializer();
config = deserialize.Deserialize<Config>(ConfigFile);
config = deserialize.Deserialize<Config>(File.ReadAllText(ConfigFile));

Console.WriteLine($"Loaded settings in {ConfigFile}");
}
catch (Exception ex)
{
Console.WriteLine($"Failed to deserialize {ConfigFile}: {ex}");
return;
}
}

Expand Down

0 comments on commit 73e61d4

Please sign in to comment.