/// <summary> /// Gets a compilation error message from the exception. /// </summary> /// <returns>A new compilation message.</returns> public CompilationMessage ToErrorMessage() { var message = new CompilationMessage { Message = base.Message }; if (RelatedNode != null && RelatedTree != null) { message.FilePath = RelatedTree.FilePath; message.Location = DocumentLocation.FromTreeNode(RelatedTree, RelatedNode); } return message; }
/// <summary> /// Gets a compilation error message from the exception. /// </summary> /// <returns>A new compilation message.</returns> public CompilationMessage ToErrorMessage() { var message = new CompilationMessage { Message = base.Message }; if (RelatedNode != null && RelatedTree != null) { message.FilePath = RelatedTree.FilePath; message.Location = DocumentLocation.FromTreeNode(RelatedTree, RelatedNode); } return(message); }
/// <summary> /// Adds a warning, using the specified message. /// </summary> /// <param name="message">The warning message.</param> public void AddWarning(CompilationMessage message) { _warnings.Add(message); }
/// <summary> /// Adds an error, using the specified message. /// </summary> /// <param name="message">The error message.</param> public void AddError(CompilationMessage message) { _errors.Add(message); }