}
public static ErrorHandler createErrorHandler(SearchConfiguration searchCfg) {
String errorHandlerClassName = searchCfg.getProperty( Environment.ERROR_HANDLER );
if ( StringHelper.isEmpty( errorHandlerClassName ) ) {
return new LogErrorHandler();
}
else if ( errorHandlerClassName.trim().equals( "log" ) ) {
return new LogErrorHandler();
}
else {
return ClassLoaderHelper.instanceFromName(
ErrorHandler.class, errorHandlerClassName,
ImmutableSearchFactory.class.getClassLoader(), "Error Handler"