// System.out.println("Line: "+err.getStartLine());
// LineMappings maps = this.pkg.getPackageCompilationData().getLineMappings( err.getFileName().replace( '/', '.' ).substring( 0, err.getFileName().length() - 5 ) );
// int line = err.getStartLine() + maps.getStartLine() - maps.getOffset() -1;
// System.out.println("Map: "+line);
final ErrorHandler handler = (ErrorHandler) this.errorHandlers.get( err.getFileName() );
if ( handler instanceof RuleErrorHandler ) {
final RuleErrorHandler rh = (RuleErrorHandler) handler;
}
handler.addError( err );
}
final Collection errors = this.errorHandlers.values();
for ( final Iterator iter = errors.iterator(); iter.hasNext(); ) {
final ErrorHandler handler = (ErrorHandler) iter.next();
if ( handler.isInError() ) {
if ( !(handler instanceof RuleInvokerErrorHandler) ) {
this.results.add( handler.getError() );
} else {
//we don't really want to report invoker errors.
//mostly as they can happen when there is a syntax error in the RHS
//and otherwise, it is a programmatic error in drools itself.
//throw new RuntimeException( "Warning: An error occurred compiling a semantic invoker. Errors should have been reported elsewhere." + handler.getError() );