protected AbstractMessage(AbstractMessage aMsg) { this.code = aMsg.code; this.location = aMsg.location; this.message = aMsg.message; this.extra_info = aMsg.extra_info; }
public override bool Equals (object obj) { AbstractMessage msg = obj as AbstractMessage; if (msg == null) return false; return code == msg.code && location.Equals (msg.location) && message == msg.message; }
void OnMessage(AbstractMessage msg) { var m = _printer; if (m != null) { m(msg); } }
public override void Print(AbstractMessage msg) { base.Print(msg); if (Stacktrace) { Console.WriteLine(FriendlyStackTrace(new StackTrace(true))); } }
public override void Print(AbstractMessage message, Boolean showFullPath) { if (message.IsWarning) Trace.WriteLine("Warning: " + message.Text); else Trace.WriteLine("Error: " + message.Text); base.Print(message, showFullPath); }
public void AddMessage(AbstractMessage msg) { if (session_messages == null) { session_messages = new ArrayList(); } session_messages.Add(msg); }
public virtual void Print(AbstractMessage msg) { if (msg.IsWarning) { ++warnings; } else { ++errors; } }
public virtual void Print (AbstractMessage msg) { if (msg.IsWarning) { ++WarningsCount; } else { ++ErrorsCount; if (ErrorsCount == FatalCounter) throw new Exception (msg.Text); } }
public virtual void Print(AbstractMessage msg, bool showFullPath) { if (msg.IsWarning) { ++WarningsCount; } else { ++ErrorsCount; } }
/// <summary> /// Handles compilation event message. /// </summary> /// <param name="msg">The compilation event message.</param> /// <param name="showFullPath">if set to <c>true</c> [show full path].</param> public override void Print(Mono.CSharp.AbstractMessage msg, bool showFullPath) { string msgInfo = string.Format("{0} {1} CS{2:0000}: {3}", msg.Location, msg.MessageType, msg.Code, msg.Text); if (!msg.IsWarning) { Errors.Add(msgInfo); } else { Warnings.Add(msgInfo); } }
public override void Print(AbstractMessage msg) { base.Print(msg); if (Stacktrace) { Console.WriteLine(FriendlyStackTrace(new StackTrace(true))); } if (++print_count == Fatal) { throw new Exception(msg.Text); } }
public override void Print (AbstractMessage msg) { // // This line is useful when debugging recorded messages // // Console.WriteLine ("RECORDING: {0}", msg.ToString ()); if (session_messages == null) session_messages = new List<AbstractMessage> (); session_messages.Add (msg); base.Print (msg); }
public void EndSession () { if (session_messages == null) return; // // Handles the first session // if (common_messages == null) { common_messages = new List<AbstractMessage> (session_messages); merged_messages = session_messages; session_messages = null; return; } // // Store common messages if any // for (int i = 0; i < common_messages.Count; ++i) { AbstractMessage cmsg = common_messages[i]; bool common_msg_found = false; foreach (AbstractMessage msg in session_messages) { if (cmsg.Equals (msg)) { common_msg_found = true; break; } } if (!common_msg_found) common_messages.RemoveAt (i); } // // Merge session and previous messages // for (int i = 0; i < session_messages.Count; ++i) { AbstractMessage msg = session_messages[i]; bool msg_found = false; for (int ii = 0; ii < merged_messages.Count; ++ii) { if (msg.Equals (merged_messages[ii])) { msg_found = true; break; } } if (!msg_found) merged_messages.Add (msg); } }
public override void Print(Compiler.AbstractMessage msg, bool showFullPath) { string text; if (msg.Code == 214) { text = "Pointers and fixed size buffers cannot be used in a dynamic context"; } else { text = msg.Text; } throw new RuntimeBinderException(text); }
public override void Print(AbstractMessage msg) { // // This line is useful when debugging recorded messages // // Console.WriteLine ("RECORDING: {0} {1} {2}", code, location, message); if (session_messages == null) { session_messages = new ArrayList(); } session_messages.Add(msg); base.Print(msg); }
public override void Print(AbstractMessage msg, bool showFullPath) { // // This line is useful when debugging recorded messages // // Console.WriteLine ("RECORDING: {0}", msg.Text); if (session_messages == null) { session_messages = new List <AbstractMessage> (); } session_messages.Add(msg); this.showFullPaths = showFullPath; base.Print(msg, showFullPath); }
public override void Print(AbstractMessage msg, bool showFullPath) { if (msg.IsWarning) { ++WarningsCount; } else { ++ErrorsCount; } compilerResults.Errors.Add(new CompilerError() { IsWarning = msg.IsWarning, Column = msg.Location.Column, Line = msg.Location.Row, ErrorNumber = msg.Code.ToString(), ErrorText = msg.Text, FileName = showFullPath ? msg.Location.SourceFile.FullPathName : msg.Location.SourceFile.Name, // msg.RelatedSymbols // extra info }); }
protected void Print(AbstractMessage msg, TextWriter output, bool showFullPath) { StringBuilder txt = new StringBuilder(); if (!msg.Location.IsNull) { if (showFullPath) { txt.Append(msg.Location.ToStringFullName()); } else { txt.Append(msg.Location.ToString()); } txt.Append(" "); } txt.AppendFormat("{0} CS{1:0000}: {2}", msg.MessageType, msg.Code, msg.Text); if (!msg.IsWarning) { output.WriteLine(FormatText(txt.ToString())); } else { output.WriteLine(txt.ToString()); } if (msg.RelatedSymbols != null) { foreach (string s in msg.RelatedSymbols) { output.WriteLine(s + msg.MessageType + ")"); } } }
public virtual void Print (AbstractMessage msg, bool showFullPath) { if (msg.IsWarning) { ++WarningsCount; } else { ++ErrorsCount; } }
public override void Print (AbstractMessage msg, bool showFullPath) { // // This line is useful when debugging recorded messages // // Console.WriteLine ("RECORDING: {0}", msg.Text); if (session_messages == null) session_messages = new List<AbstractMessage> (); session_messages.Add (msg); this.showFullPaths = showFullPath; base.Print (msg, showFullPath); }
protected void Print (AbstractMessage msg, TextWriter output) { StringBuilder txt = new StringBuilder (); if (!msg.Location.IsNull) { txt.Append (msg.Location.ToString ()); txt.Append (" "); } txt.AppendFormat ("{0} CS{1:0000}: {2}", msg.MessageType, msg.Code, msg.Text); if (!msg.IsWarning) output.WriteLine (FormatText (txt.ToString ())); else output.WriteLine (txt.ToString ()); if (msg.RelatedSymbols != null) { foreach (string s in msg.RelatedSymbols) output.WriteLine (s + msg.MessageType + ")"); } }
public override void Print (AbstractMessage msg, bool showFullPath) { var line = 0; var column = 0; try { line = msg.Location.Row; column = msg.Location.Column; } catch { //Log (ex); } var m = new EvalMessage { MessageType = msg.MessageType, Text = msg.Text, Line = line, Column = column, }; Messages.Add (m); // // Print it to the console if there's an error // if (msg.MessageType == "error") { var tm = msg.Text; System.Threading.ThreadPool.QueueUserWorkItem (_ => Console.WriteLine ("ERROR: {0}", tm)); } }
public ErrorMessage (AbstractMessage aMsg) : base (aMsg) { }
public void AddMessage (AbstractMessage msg) { if (session_messages == null) session_messages = new ArrayList (); session_messages.Add (msg); }
public override void Print(AbstractMessage msg, bool showFullPath) { Client.SendChat(ChatColors.Red + msg.Text); }
public override void Print (AbstractMessage msg) { Assert.Fail (msg.Text); }
public override void Print (AbstractMessage msg) { Print (msg, writer); base.Print (msg); }
public override void Print (AbstractMessage msg, bool showFullPath) { Assert.Fail (msg.Text); }
public override void Print(AbstractMessage msg) { messages.Append(msg.Text); }
public override void Print(AbstractMessage msg, bool showFullPath) { Message = msg; }
public override void Print (AbstractMessage msg, bool showFullPath) { Print (msg, writer, showFullPath); base.Print (msg, showFullPath); }
public ErrorMessage(AbstractMessage aMsg) : base(aMsg) { }
public override void Print(AbstractMessage msg, bool showFullPath) { base.Print(msg, showFullPath); _errorReporter.Region = new DomRegion(msg.Location.NameFullPath, msg.Location.Row, msg.Location.Column, msg.Location.Row, msg.Location.Column); _errorReporter.Message(msg.IsWarning ? MessageSeverity.Warning : MessageSeverity.Error, msg.Code, msg.Text.Replace("{", "{{").Replace("}", "}}")); }
public override void Print(AbstractMessage msg) { base.Print(msg); _r.OnMessage(msg); }
public override void Print(Compiler.AbstractMessage msg) { throw new RuntimeBinderException(msg.Text); }
public override void Print (AbstractMessage msg) { base.Print (msg); if (Stacktrace) Console.WriteLine (FriendlyStackTrace (new StackTrace (true))); if (++print_count == Fatal) throw new Exception (msg.Text); }
public override void Print (AbstractMessage msg) { base.Print (msg); Error newError = new Error (msg.IsWarning ? ErrorType.Warning : ErrorType.Error, msg.Location.Row, msg.Location.Column, msg.Text); Errors.Add (newError); }
public virtual void Print (AbstractMessage msg) { if (msg.IsWarning) ++warnings; else ++errors; }
// public readonly List<Error> Errors = new List<Error> (); public override void Print (AbstractMessage msg) { Console.WriteLine (msg.MessageType + " (" + msg.Location + ")" + ": " + msg.Text); base.Print (msg); // Error newError = new Error (msg.IsWarning ? ErrorType.Warning : ErrorType.Error, msg.Location.Row, msg.Location.Column, msg.Text); // Errors.Add (newError); }
public override void Print (AbstractMessage msg) { // // This line is useful when debugging recorded messages // // Console.WriteLine ("RECORDING: {0} {1} {2}", code, location, message); if (session_messages == null) session_messages = new ArrayList (); session_messages.Add (msg); base.Print (msg); }
public override void Print(AbstractMessage msg, bool showFullPath) { base.Print(msg, showFullPath); unreadMessages.Enqueue(msg); }
public override void Print (AbstractMessage msg) { base.Print (msg); if (Stacktrace) Console.WriteLine (FriendlyStackTrace (new StackTrace (true))); }
public override void Print(AbstractMessage msg, bool showFullPath) { Print(msg, writer, showFullPath); base.Print(msg, showFullPath); }
public override void Print(AbstractMessage msg, bool showFullPath) { base.Print(msg, showFullPath); var newError = new Error(msg.IsWarning ? ErrorType.Warning : ErrorType.Error, msg.Text, new DomRegion(fileName, msg.Location.Row, msg.Location.Column)); Errors.Add(newError); }
public override void Print(AbstractMessage msg, bool showFullPath) { base.Print(msg, output, showFullPath); }