/// <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;
        }
Beispiel #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);
        }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }