
graphql.InvalidSyntaxError Maven / Gradle / Ivy
package graphql;
import graphql.language.SourceLocation;
import java.util.ArrayList;
import java.util.List;
public class InvalidSyntaxError implements GraphQLError {
private final List sourceLocations = new ArrayList();
public InvalidSyntaxError(SourceLocation sourceLocation) {
if (sourceLocation != null)
this.sourceLocations.add(sourceLocation);
}
public InvalidSyntaxError(List sourceLocations) {
if (sourceLocations != null) {
this.sourceLocations.addAll(sourceLocations);
}
}
@Override
public String getMessage() {
return "Invalid Syntax";
}
@Override
public List getLocations() {
return sourceLocations;
}
@Override
public ErrorType getErrorType() {
return ErrorType.InvalidSyntax;
}
@Override
public String toString() {
return "InvalidSyntaxError{" +
"sourceLocations=" + sourceLocations +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy