예제 #1
0
 public CompileError(CompileErrorCode code, string file, uint line, string msg)
     : this()
 {
     Code    = code;
     File    = file;
     Line    = line;
     Message = msg;
 }
예제 #2
0
		/// <summary>
		/// Adds the given error to the compiler's list of errors
		/// </summary>
		/// <param name="code"></param>
		/// <param name="file"></param>
		/// <param name="line"></param>
		/// <param name="msg"></param>
		internal void AddError( CompileErrorCode code, string file, uint line, string msg )
		{
			CompileError error = new CompileError( code, file, line, msg );

			if ( this.OnCompileError != null )
			{
				this.OnCompileError( this, error );
			}
			else
			{
				string str = string.Format( "Compiler error: {0} in {1}({2})",
					ScriptEnumAttribute.GetScriptAttribute( (int)code, typeof( CompileErrorCode ) ), file, line );

				if ( !string.IsNullOrEmpty( msg ) )
					str += ": " + msg;

				LogManager.Instance.Write( str );
			}

			_errors.Add( error );
		}
예제 #3
0
		internal void AddError( CompileErrorCode code, string file, uint line )
		{
			this.AddError( code, file, line, string.Empty );
		}
예제 #4
0
			public CompileError( CompileErrorCode code, string file, uint line, string msg )
				: this()
			{
				this.Code = code;
				this.File = file;
				this.Line = line;
				this.Message = msg;
			}
예제 #5
0
			public CompileError( CompileErrorCode code, string file, uint line, string msg )
				: this()
			{
				Code = code;
				File = file;
				Line = line;
				Message = msg;
			}