public static void WriteExceptionLog(Exception e, object sender, string messageText) { string text = "\nError: "; text += ((!string.IsNullOrEmpty(messageText)) ? messageText : "No error message given."); text += "\n\n ----- Sender: "; text += ((sender != null) ? sender.GetType().FullName : "null or static"); text = text + "\n\n ----- Exception: " + e.ToString(); ScriptError scriptError = new ScriptError(null, new Exception(text), 0); scriptError.WriteMiniScriptError(); if (Debugger.sLastReported == DateTime.MinValue || (DateTime.Now - Debugger.sLastReported).Minutes > 1) { Debugger.Append("fer456_VampireTweaker_CustomSkills Script Error caught. Check user files for specifics and report to the developer (fer456). Check Documents/Electronic Arts/The Sims 3/ for get the script error files. Thank you!. This script error is caused because there is a problem to load the buff booter when the world is loaded."); } Debugger.sLastReported = DateTime.Now; }
public static void WriteExceptionLog(Exception e, object sender, string message) { string text = "\nError: "; text += !string.IsNullOrEmpty(message) ? message : "No error message given."; text += "\n\n ----- Sender: "; text += sender != null?sender.GetType().FullName : "Null or Static"; text += "\n\n ----- Exception: " + e.ToString(); ScriptError error = new ScriptError(null, new Exception(text), 0); error.WriteMiniScriptError(); if (sLastReported == DateTime.MinValue || (DateTime.Now - sLastReported).Minutes > 1) { Append("Script Error Caught. Check user files for specifics."); } sLastReported = DateTime.Now; }