private void RegisterError(IGherkinListener gherkinListener, ScanningErrorException scanningErrorException, Exception originalException) { var position = scanningErrorException.GetPosition(buffer); gherkinListener.Error( scanningErrorException.Message, position ?? buffer.EndPosition, originalException); }
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); }