Fixed exception in commands crashing the server
Removed Tools.WriteError using Log.Error instead.
This commit is contained in:
parent
8d13023dac
commit
1ea6d2e955
5 changed files with 31 additions and 34 deletions
|
|
@ -22,7 +22,6 @@ namespace TShockAPI
|
|||
{
|
||||
internal class FileTools
|
||||
{
|
||||
public static readonly string ErrorsPath = Path.Combine(TShock.SavePath, "errors.txt");
|
||||
public static readonly string RulesPath = Path.Combine(TShock.SavePath, "rules.txt");
|
||||
public static readonly string MotdPath = Path.Combine(TShock.SavePath, "motd.txt");
|
||||
public static readonly string BansPath = Path.Combine(TShock.SavePath, "bans.txt");
|
||||
|
|
@ -44,17 +43,6 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes an error message to errors.txt
|
||||
/// </summary>
|
||||
/// <param name="err">string message</param>
|
||||
public static void WriteError(string err)
|
||||
{
|
||||
TextWriter tw = new StreamWriter(ErrorsPath, true);
|
||||
tw.WriteLine(err);
|
||||
tw.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets up the configuration file for all variables, and creates any missing files.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue