Permalink
Browse files

better error handling

  • Loading branch information...
1 parent c48d860 commit 0ec56501709ea4b0ca10cb2a6d6dec0cbdea6c5d @erh committed May 23, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/main/xgen/irc/RoomLogging.java
View
4 src/main/xgen/irc/RoomLogging.java
@@ -125,6 +125,10 @@ int _getBucketNumber( String room ) {
DBObject res = _db.command( cmd );
List results = (List)res.get( "results" );
+ if ( results == null ) {
+ LOG.log( Level.WARNING , "can't do fts query: " + res );
+ return lst;
+ }
for ( Object raw : results ) {
DBObject scored = (DBObject)raw;
DBObject bucket = (DBObject)scored.get( "obj" );

0 comments on commit 0ec5650

Please sign in to comment.