Terraria.ModLoader.ErrorLogger.LogBuildError C# (CSharp) Method

LogBuildError() static private method

static private LogBuildError ( string errorText ) : void
errorText string
return void
		internal static void LogBuildError(string errorText) {
			Directory.CreateDirectory(LogPath);
			File.WriteAllText(CompileErrorPath, errorText);
			Console.WriteLine(errorText);

			Interface.errorMessage.SetMessage(errorText);
			Interface.errorMessage.SetGotoMenu(Interface.modSourcesID);
			Interface.errorMessage.SetFile(CompileErrorPath);
		}

Usage Example

Exemplo n.º 1
0
        private static BuildingMod ReadProperties(string modFolder, IBuildStatus status)
        {
            if (modFolder.EndsWith("\\") || modFolder.EndsWith("/"))
            {
                modFolder = modFolder.Substring(0, modFolder.Length - 1);
            }
            var modName = Path.GetFileName(modFolder);

            status.SetStatus(Language.GetTextValue("tModLoader.MSReadingProperties") + modName);

            BuildProperties properties;

            try {
                properties = BuildProperties.ReadBuildFile(modFolder);
            }
            catch (Exception e) {
                ErrorLogger.LogBuildError("Failed to load " + Path.Combine(modFolder, "build.txt") + Environment.NewLine + e);
                return(null);
            }

            var file    = Path.Combine(ModPath, modName + ".tmod");
            var modFile = new TmodFile(file)
            {
                name    = modName,
                version = properties.version
            };

            return(new BuildingMod(modFile, properties, modFolder));
        }
All Usage Examples Of Terraria.ModLoader.ErrorLogger::LogBuildError