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); }
// // Prints collected messages, common messages have a priority // public bool Merge(ReportPrinter dest) { var messages_to_print = merged_messages; if (common_messages != null && common_messages.Count > 0) { messages_to_print = common_messages; } if (messages_to_print == null) { return(false); } bool error_msg = false; foreach (AbstractMessage msg in messages_to_print) { dest.Print(msg, showFullPaths); error_msg |= !msg.IsWarning; } if (reported_missing_definitions != null) { foreach (var missing in reported_missing_definitions) { dest.MissingTypeReported(missing); } } return(error_msg); }
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); }
// // Prints collected messages, common messages have a priority // public bool Merge (ReportPrinter dest) { var messages_to_print = merged_messages; if (common_messages != null && common_messages.Count > 0) { messages_to_print = common_messages; } if (messages_to_print == null) return false; bool error_msg = false; foreach (AbstractMessage msg in messages_to_print) { dest.Print (msg); error_msg |= !msg.IsWarning; } return error_msg; }
// // Prints collected messages, common messages have a priority // public bool Merge(ReportPrinter dest) { ArrayList messages_to_print = merged_messages; if (common_messages != null && common_messages.Count > 0) { messages_to_print = common_messages; } if (messages_to_print == null) { return(false); } foreach (AbstractMessage msg in messages_to_print) { dest.Print(msg); } return(true); }
// // Prints collected messages, common messages have a priority // public bool Merge (ReportPrinter dest) { ArrayList messages_to_print = merged_messages; if (common_messages != null && common_messages.Count > 0) { messages_to_print = common_messages; } if (messages_to_print == null) return false; foreach (AbstractMessage msg in messages_to_print) dest.Print (msg); return true; }
// // Prints collected messages, common messages have a priority // public bool Merge (ReportPrinter dest) { var messages_to_print = merged_messages; if (common_messages != null && common_messages.Count > 0) { messages_to_print = common_messages; } if (messages_to_print == null) return false; bool error_msg = false; foreach (AbstractMessage msg in messages_to_print) { dest.Print (msg, showFullPaths); error_msg |= !msg.IsWarning; } if (reported_missing_definitions != null) { foreach (var missing in reported_missing_definitions) dest.MissingTypeReported (missing); } return error_msg; }