gherkin.parser.ParseError Maven / Gradle / Ivy
package gherkin.parser;
import gherkin.util.FixJava;
import java.util.List;
public class ParseError extends RuntimeException {
private final String state;
private final List legalEvents;
public ParseError(String state, String event, List legalEvents, String uri, Integer line) {
super("Parse error at " + uri + ":" + line + ". Found " + event + " when expecting one of: " + FixJava.join(legalEvents, ", ") + ". (Current getState: " + state + ").");
this.state = state;
this.legalEvents = legalEvents;
}
public List getLegalEvents() {
return legalEvents;
}
public String getState() {
return state;
}
}