if ( error instanceof ParserError ) {
ParserError err = (ParserError) error;
markers.add( new DroolsBuildMarker( err.getMessage(),
err.getRow() ) );
} else if ( error instanceof KnowledgeBuilderResult) {
KnowledgeBuilderResult res = (KnowledgeBuilderResult) error;
int[] errorLines = res.getLines();
markers.add( new DroolsBuildMarker( res.getMessage(),
errorLines != null && errorLines.length > 0 ? errorLines[0] : -1 ) );
} else if ( error instanceof ExpanderException ) {
ExpanderException exc = (ExpanderException) error;
// TODO line mapping is incorrect
markers.add( new DroolsBuildMarker( exc.getMessage(),