public override void VisitMarkerTag(MarkerTag tag)
            {
                string oldMarkerClass = currentMarkerClass;

                if (IsRecognizedMarkerClass(tag.Class))
                {
                    currentMarkerClass = tag.Class;
                }

                if (currentMarkerClass == Marker.ExceptionClass ||
                    currentBuilder == null && currentMarkerClass == Marker.StackTraceClass)
                {
                    ExceptionDataBuilder oldBuilder = currentBuilder;
                    currentBuilder = new ExceptionDataBuilder();

                    base.VisitMarkerTag(tag);

                    // Handle the case where the stack trace is not part of an exception but appears
                    // within a section that provides additional information since we don't have an exception
                    // type or anything else.  In particular, this is the case for AssertionFailures.
                    if (currentBuilder.Message.Length == 0 && currentSectionName != null)
                    {
                        currentBuilder.Message.Append(currentSectionName);
                    }

                    FlushExceptionProperty(string.Empty);

                    ExceptionData currentException = currentBuilder.ToExceptionData();
                    if (oldBuilder != null)
                    {
                        oldBuilder.Inner = currentException;
                    }
                    else
                    {
                        publishException(currentException);
                    }

                    currentBuilder = oldBuilder;
                }
                else
                {
                    base.VisitMarkerTag(tag);
                }

                currentMarkerClass = oldMarkerClass;
            }
            public override void VisitMarkerTag(MarkerTag tag)
            {
                string oldMarkerClass = currentMarkerClass;

                if (IsRecognizedMarkerClass(tag.Class))
                    currentMarkerClass = tag.Class;

                if (currentMarkerClass == Marker.ExceptionClass ||
                    currentBuilder == null && currentMarkerClass == Marker.StackTraceClass)
                {
                    ExceptionDataBuilder oldBuilder = currentBuilder;
                    currentBuilder = new ExceptionDataBuilder();

                    base.VisitMarkerTag(tag);

                    // Handle the case where the stack trace is not part of an exception but appears
                    // within a section that provides additional information since we don't have an exception
                    // type or anything else.  In particular, this is the case for AssertionFailures.
                    if (currentBuilder.Message.Length == 0 && currentSectionName != null)
                        currentBuilder.Message.Append(currentSectionName);

                    FlushExceptionProperty(string.Empty);

                    ExceptionData currentException = currentBuilder.ToExceptionData();
                    if (oldBuilder != null)
                        oldBuilder.Inner = currentException;
                    else
                        publishException(currentException);

                    currentBuilder = oldBuilder;
                }
                else
                {
                    base.VisitMarkerTag(tag);
                }

                currentMarkerClass = oldMarkerClass;
            }