예제 #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;
        }
예제 #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);
        }
예제 #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);
 }
예제 #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);
 }
예제 #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);
 }
예제 #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);
 }