catch IndexControlRWIs_p error if RWI not connected

pull/1/head
reger 11 years ago
parent 38864ae004
commit 3963bca3b6

@ -61,6 +61,7 @@ import net.yacy.peers.Seed;
import net.yacy.repository.Blacklist;
import net.yacy.repository.Blacklist.BlacklistType;
import net.yacy.search.Switchboard;
import net.yacy.search.SwitchboardConstants;
import net.yacy.search.index.Segment;
import net.yacy.search.query.QueryGoal;
import net.yacy.search.query.QueryModifier;
@ -331,7 +332,8 @@ public class IndexControlRWIs_p {
}
}
// generate list
// generate list (if RWI connected, otherwise NPE)
if (sb.getConfigBool(SwitchboardConstants.CORE_SERVICE_RWI, true)) {
if ( post.containsKey("keyhashsimilar") ) {
try {
final Iterator<ReferenceContainer<WordReference>> containerIt =
@ -360,6 +362,9 @@ public class IndexControlRWIs_p {
ConcurrentLog.logException(e);
}
}
} else {
prop.put("result", "RWI index not connected (see Index Sources & Targets -> <a href='IndexFederated_p.html'>Peer-to-Peer Operation</a>)");
}
if ( post.containsKey("blacklist") ) {
final String blacklist = post.get("blacklist", "");

Loading…
Cancel
Save