Inheritance: AbstractMessage
コード例 #1
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))
            {
                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);
        }
コード例 #2
0
        static public void Warning(int code, int level, Location loc, string format, params object[] args)
        {
            WarningMessage w = new WarningMessage(code, level, loc, String.Format(format, args), extra_information);

            extra_information.Clear();
            w.Print();
        }
コード例 #3
0
        static public void Warning(int code, int level, Location loc, string message)
        {
            WarningMessage w = new WarningMessage(code, level, loc, message, extra_information);

            extra_information.Clear();
            w.Print();
        }
コード例 #4
0
        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);
        }
コード例 #5
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);
		}
コード例 #6
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);
		}
コード例 #7
0
ファイル: report.cs プロジェクト: lewurm/benchmarker
		static public void Warning (int code, int level, Location loc, string format, params object[] args)
		{
			WarningMessage w = new WarningMessage (code, level, loc, String.Format (format, args), extra_information);
			extra_information.Clear ();
			w.Print ();
		}
コード例 #8
0
ファイル: report.cs プロジェクト: lewurm/benchmarker
		static public void Warning (int code, int level, Location loc, string message)
		{
			WarningMessage w = new WarningMessage (code, level, loc, message, extra_information);
			extra_information.Clear ();
			w.Print ();
		}