상속: AbstractMessage
예제 #1
0
		public void Error (int code, Location loc, string error)
		{
			if (reporting_disabled > 0)
				return;

			ErrorMessage msg = new ErrorMessage (code, loc, error, extra_information);
			extra_information.Clear ();

			printer.Print (msg);

			if (Fatal)
				throw new Exception (msg.Text);
		}
예제 #2
0
파일: report.cs 프로젝트: Profit0004/mono
		public void Error (int code, Location loc, string error)
		{
			if (reporting_disabled > 0)
				return;

			ErrorMessage msg = new ErrorMessage (code, loc, error, extra_information);
			extra_information.Clear ();

			printer.Print (msg, settings.ShowFullPaths);

			if (settings.Stacktrace)
				Console.WriteLine (FriendlyStackTrace (new StackTrace (true)));

			if (printer.ErrorsCount == settings.FatalCounter)
				throw new FatalException (msg.Text);
		}
예제 #3
0
		public void Warning (int code, int level, Location loc, string message)
		{
			if (reporting_disabled > 0)
				return;

			if (!IsWarningEnabled (code, level, loc))
				return;

			AbstractMessage msg;
			if (IsWarningAsError (code))
				msg = new ErrorMessage (code, loc, message, extra_information);
			else
				msg = new WarningMessage (code, loc, message, extra_information);

			extra_information.Clear ();
			printer.Print (msg);
		}
예제 #4
0
파일: report.cs 프로젝트: Profit0004/mono
		public void Warning (int code, int level, Location loc, string message)
		{
			if (reporting_disabled > 0)
				return;

			if (!settings.IsWarningEnabled (code, level))
				return;

			if (warning_regions_table != null && !loc.IsNull) {
				WarningRegions regions;
				if (warning_regions_table.TryGetValue (loc.File, out regions) && !regions.IsWarningEnabled (code, loc.Row))
					return;
			}

			AbstractMessage msg;
			if (settings.IsWarningAsError (code)) {
				message = "Warning as Error: " + message;
				msg = new ErrorMessage (code, loc, message, extra_information);
			} else {
				msg = new WarningMessage (code, loc, message, extra_information);
			}

			extra_information.Clear ();
			printer.Print (msg, settings.ShowFullPaths);
		}