Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ShowFileSavingFailError()

static void Terraria.UI.FancyErrorPrinter.ShowFileSavingFailError ( Exception exception,
string filePath )
inlinestatic

Definition at line 47 of file FancyErrorPrinter.cs.

48 {
49 bool flag = false;
51 {
52 flag = true;
53 }
55 {
56 flag = true;
57 }
59 {
60 flag = true;
61 }
62 if (flag)
63 {
65 stringBuilder.AppendLine("Failed to create the file: \"" + filePath.Replace("/", "\\") + "\"!");
66 List<string> list = new List<string> { "If you are using an Anti-virus, please make sure it does not block Terraria in any way.", "Try making sure your `Documents/My Games/Terraria` folder is not set to 'read-only'.", "Try to verify/repair the game installation." };
67 if (filePath.ToLower().Contains("onedrive"))
68 {
69 list.Add("Try updating OneDrive.");
70 }
71 stringBuilder.AppendLine();
72 stringBuilder.AppendLine("Suggestions:");
74 stringBuilder.AppendLine();
76 ShowTheBox(stringBuilder.ToString());
78 }
79 }
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
static void WriteLine()
Definition Console.cs:733
static void AppendSuggestions(StringBuilder text, List< string > suggestions)
static void IncludeOriginalMessage(StringBuilder text, Exception exception)
static void ShowTheBox(string preparedMessage)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), Terraria.UI.FancyErrorPrinter.AppendSuggestions(), System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), System.exception, Terraria.UI.FancyErrorPrinter.IncludeOriginalMessage(), System.list, Terraria.UI.FancyErrorPrinter.ShowTheBox(), and System.Console.WriteLine().

Referenced by Terraria.IO.FavoritesFile.Save(), Terraria.Achievements.AchievementManager.Save(), Terraria.Player.SavePlayer(), and Terraria.IO.WorldFile.SaveWorld().