Object error = iter.next();
if (error instanceof ParserError) {
ParserError err = (ParserError) error;
markers.add(new DroolsBuildMarker(err.getMessage(), err.getRow()));
} else if (error instanceof ExpanderException) {
ExpanderException exc = (ExpanderException) error;
// TODO line mapping is incorrect
markers.add(new DroolsBuildMarker(exc.getMessage(), -1));
} else {
markers.add(new DroolsBuildMarker(error.toString()));
}
}
}