Removed try cache on config file, will now fail startup. Fixes #334

This commit is contained in:
Lucas Nicodemus 2012-02-02 21:41:14 -07:00
parent 66d103d3e2
commit 332bfe99f4

View file

@ -74,24 +74,13 @@ namespace TShockAPI
CreateIfNot(MotdPath,
"This server is running TShock for Terraria.\n Type /help for a list of commands.\n%255,000,000%Current map: %map%\nCurrent players: %players%");
CreateIfNot(WhitelistPath);
if (File.Exists(ConfigPath))
{
TShock.Config = ConfigFile.Read(ConfigPath);
// Add all the missing config properties in the json file
}
TShock.Config.Write(ConfigPath);
try
{
if (File.Exists(ConfigPath))
{
TShock.Config = ConfigFile.Read(ConfigPath);
// Add all the missing config properties in the json file
}
TShock.Config.Write(ConfigPath);
}
catch (Exception ex)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Error in config file");
Console.ForegroundColor = ConsoleColor.Gray;
Log.Error("Config Exception");
Log.Error(ex.ToString());
}
}
/// <summary>