예제 #1
0
        /// <summary>
        /// Reads and transforms the given stack trace into a manageable and ordered
        /// set of ErrorItem instances. The resulting set is stored into Items property.
        /// </summary>
        /// <param name="stackTrace">A string value that should contain a .Net stack trace.</param>
        public void Parse(string stackTrace)
        {
            DefaultTextManager lines;
            RawError           rawError;

            _items.Clear();

            lines      = new DefaultTextManager();
            lines.Text = stackTrace;

            foreach (string line in lines)
            {
                rawError = new RawError(line);

                if (!_functionParsers.TryParse(this, rawError))
                {
                    continue;
                }

                _pathParsers.TryParse(this, rawError);
                _lineNumberParsers.TryParse(this, rawError);

                _items.Add(rawError.ToErrorItem());
            }

            return;
        }
        public RawError AcceptValue(IErrorParser parser, string error)
        {
            RawError res;

            res = new RawError(error);
            Assert.That(parser.TryParse(_stack, res), Is.True, "Failed to parse \"{0}\"", error);

            return(res);
        }
예제 #3
0
        public RawError AcceptValue(IErrorParser parser, string error)
        {
            RawError res;

            res = new RawError(error);
            Assert.That(parser.TryParse(_stack, res), Is.True, "Failed to parse \"{0}\"", error);

            return (res);
        }
 public void RejectValue(IErrorParser parser, string error)
 {
     Assert.That(parser.TryParse(_stack, new RawError(error)), Is.False);
 }
예제 #5
0
 public void RejectValue(IErrorParser parser, string error)
 {
     Assert.That(parser.TryParse(_stack, new RawError(error)), Is.False);
 }