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

◆ ShowFailedToLoadAssetError()

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

Definition at line 13 of file FancyErrorPrinter.cs.

14 {
15 bool flag = false;
17 {
18 flag = true;
19 }
21 {
22 flag = true;
23 }
25 {
26 flag = true;
27 }
29 {
30 flag = true;
31 }
32 if (flag)
33 {
35 stringBuilder.AppendLine("Failed to load asset: \"" + filePath.Replace("/", "\\") + "\"!");
36 List<string> suggestions = new List<string> { "Try to verify/repair the game installation, the asset may be missing.", "If you are using an Anti-virus, please make sure it does not block Terraria in any way." };
37 stringBuilder.AppendLine();
38 stringBuilder.AppendLine("Suggestions:");
40 stringBuilder.AppendLine();
42 ShowTheBox(stringBuilder.ToString());
44 }
45 }
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 Terraria.UI.FancyErrorPrinter.AppendSuggestions(), System.exception, Terraria.UI.FancyErrorPrinter.IncludeOriginalMessage(), Terraria.UI.FancyErrorPrinter.ShowTheBox(), and System.Console.WriteLine().

Referenced by Terraria.Main.OnceFailedLoadingAnAsset(), and Terraria.GameContent.UI.States.AWorkshopPublishInfoState< TPublishedObjectType >.UpdateImagePreview().