Esempio n. 1
0
        private static IExceptionViewModel GetAggregateException(ILuceneSearcher searcher, string id)
        {
            var exception = searcher.GetDocument(LogField.INDEX_DTS, id, 999);

            if (exception.GetField(LogField.EXCEPTION_TYPE_NAME) == null)
            {
                return(null);
            }

            return(new ExceptionViewModel
            {
                Message = exception.Get(LogField.MESSAGE),
                StackTrace = exception.Get(LogField.STACKTRACE),
                InnerException = InnerExceptionViewModel.Get(searcher, exception),
            });
        }
Esempio n. 2
0
        public static IExceptionViewModel Get(ILuceneSearcher searcher, Document doc)
        {
            if (doc.GetField(LogField.EXCEPTION) == null)
            {
                return(null);
            }

            var exception = searcher.GetDocument(LogField.INDEX_DTS, doc.Get(LogField.EXCEPTION), 999);

            return(new ExceptionViewModel
            {
                Message = exception.Get(LogField.MESSAGE),
                StackTrace = exception.Get(LogField.STACKTRACE),
                InnerException = InnerExceptionViewModel.Get(searcher, exception),
                AggregatedExceptions = GetAggregatedExceptions(searcher, doc)
            });
        }