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

◆ ShowDirectoryCreationFailError()

static void Terraria.UI.FancyErrorPrinter.ShowDirectoryCreationFailError ( Exception exception,
string folderPath )
inlinestatic

Definition at line 81 of file FancyErrorPrinter.cs.

82 {
83 bool flag = false;
85 {
86 flag = true;
87 }
89 {
90 flag = true;
91 }
93 {
94 flag = true;
95 }
96 if (flag)
97 {
99 stringBuilder.AppendLine("Failed to create the folder: \"" + folderPath.Replace("/", "\\") + "\"!");
100 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." };
101 if (folderPath.ToLower().Contains("onedrive"))
102 {
103 list.Add("Try updating OneDrive.");
104 }
105 stringBuilder.AppendLine();
106 stringBuilder.AppendLine("Suggestions:");
108 stringBuilder.AppendLine();
110 ShowTheBox(stringBuilder.ToString());
112 }
113 }
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.Utils.TryCreatingDirectory().