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

◆ ShowFileSavingFailError()

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

Definition at line 45 of file FancyErrorPrinter.cs.

46 {
47 bool flag = false;
49 {
50 flag = true;
51 }
53 {
54 flag = true;
55 }
57 {
58 flag = true;
59 }
60 if (flag)
61 {
62 StringBuilder stringBuilder = new StringBuilder();
63 stringBuilder.AppendLine("Failed to create the file: \"" + filePath.Replace("/", "\\") + "\"!");
64 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 verifying integrity of game files via Steam." };
65 if (filePath.ToLower().Contains("onedrive"))
66 {
67 list.Add("Try updating OneDrive.");
68 }
69 stringBuilder.AppendLine();
70 stringBuilder.AppendLine("Suggestions:");
72 stringBuilder.AppendLine();
75 }
76 }
static void MessageBoxShow(string message, bool fatal=false)
This class handles displaying errors that require a OS-provided modal message box....
static void AppendSuggestions(StringBuilder text, List< string > suggestions)
static void IncludeOriginalMessage(StringBuilder text, Exception exception)

References Terraria.UI.FancyErrorPrinter.AppendSuggestions(), Terraria.UI.FancyErrorPrinter.IncludeOriginalMessage(), and Terraria.ModLoader.Engine.ErrorReporting.MessageBoxShow().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function: