protected void LogMessage(CppLogMessageType type, string message, CppSourceLocation?location = null) { // Try to recover a proper location var locationResolved = location ?? new CppSourceLocation(); // In case we have an unexpected BuilderException, use this location instead Log(new CppDiagnosticMessage(type, message, locationResolved)); }
public CppDiagnosticMessage(CppLogMessageType type, string text, CppSourceLocation location) { if (text == null) { throw new ArgumentNullException(nameof(text)); } Type = type; Text = text; Location = location; }