Exemplo n.º 1
0
        /// <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;
        }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Adds a warning, using the specified message.
 /// </summary>
 /// <param name="message">The warning message.</param>
 public void AddWarning(CompilationMessage message)
 {
     _warnings.Add(message);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Adds an error, using the specified message.
 /// </summary>
 /// <param name="message">The error message.</param>
 public void AddError(CompilationMessage message)
 {
     _errors.Add(message);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Adds a warning, using the specified message.
 /// </summary>
 /// <param name="message">The warning message.</param>
 public void AddWarning(CompilationMessage message)
 {
     _warnings.Add(message);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Adds an error, using the specified message.
 /// </summary>
 /// <param name="message">The error message.</param>
 public void AddError(CompilationMessage message)
 {
     _errors.Add(message);
 }