Axiom.Serialization.MaterialSerializer.LogParseError C# (CSharp) Метод

LogParseError() защищенный статический Метод

Helper method for logging parser errors.
protected static LogParseError ( MaterialScriptContext context, string error ) : void
context MaterialScriptContext Current parsing context.
error string Error message.
Результат void
		protected static void LogParseError( MaterialScriptContext context, string error, params object[] substitutions )
		{
			StringBuilder errorBuilder = new StringBuilder();

			// log material name only if filename not specified
			if ( context.filename == null && context.material != null )
			{
				errorBuilder.Append( "Error in material " );
				errorBuilder.Append( context.material.Name );
				errorBuilder.Append( " : " );
				errorBuilder.AppendFormat( error, substitutions );
			}
			else
			{
				if ( context.material != null )
				{
					errorBuilder.Append( "Error in material " );
					errorBuilder.Append( context.material.Name );
					errorBuilder.AppendFormat( " at line {0} ", context.lineNo );
					errorBuilder.AppendFormat( " of {0}: ", context.filename );
					errorBuilder.AppendFormat( error, substitutions );
				}
				else
				{
					errorBuilder.AppendFormat( "Error at line {0} ", context.lineNo );
					errorBuilder.AppendFormat( " of {0}: ", context.filename );
					errorBuilder.AppendFormat( error, substitutions );
				}
			}

			LogManager.Instance.Write( errorBuilder.ToString() );
		}