示例#1
0
        private void RegisterError(IGherkinListener gherkinListener, ScanningErrorException scanningErrorException, Exception originalException)
        {
            var position = scanningErrorException.GetPosition(buffer);

            gherkinListener.Error(
                scanningErrorException.Message,
                position ?? buffer.EndPosition,
                originalException);
        }
示例#2
0
        public void feature(string keyword, string name, string description, int line)
        {
            FlushDelayedCalls();

            if (afterFeature)
            {
                var editorLine    = GetEditorLine(line);
                var errorPosition = GetLineStartPositionIgnoreWhitespace(editorLine);
                gherkinListener.Error("Duplicated feature title", errorPosition, null);
                return;
            }

            afterFeature = true;

            GherkinBufferSpan descriptionSpan;
            var headerSpan = ProcessComplexLanguageElement(line, description, out descriptionSpan);

            gherkinListener.Feature(keyword, name, description, headerSpan, descriptionSpan);
        }
示例#3
0
        private void RegisterError(IGherkinListener gherkinListener, ScanningErrorException scanningErrorException, Exception originalException)
        {
            var position = scanningErrorException.GetPosition(buffer);

            gherkinListener.Error(
                scanningErrorException.Message, 
                position ?? buffer.EndPosition, 
                originalException);
        }