From a02fdf8625cb3fb1502bc2dbf51f790aeb06e152 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Mon, 23 Jan 2012 00:47:25 +0100 Subject: [PATCH] better error messages --- source/net/yacy/kelondro/rwi/ReferenceIterator.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/net/yacy/kelondro/rwi/ReferenceIterator.java b/source/net/yacy/kelondro/rwi/ReferenceIterator.java index 764e2d362..fb54e6c95 100644 --- a/source/net/yacy/kelondro/rwi/ReferenceIterator.java +++ b/source/net/yacy/kelondro/rwi/ReferenceIterator.java @@ -30,6 +30,7 @@ import java.io.File; import java.io.IOException; import java.util.Map; +import net.yacy.cora.document.UTF8; import net.yacy.cora.order.CloneableIterator; import net.yacy.kelondro.blob.HeapReader; import net.yacy.kelondro.index.RowSet; @@ -55,6 +56,7 @@ public class ReferenceIterator extends LookAhe * return an index container * because they may get very large, it is wise to deallocate some memory before calling next() */ + @Override public ReferenceContainer next0() { if (this.blobs == null) return null; RowSet row; @@ -65,15 +67,15 @@ public class ReferenceIterator extends LookAhe try { row = RowSet.importRowSet(entry.getValue(), this.factory.getRow()); if (row == null) { - Log.logSevere("ReferenceIterator", "lost entry '" + entry.getKey() + "' because importRowSet returned null"); + Log.logSevere("ReferenceIterator", "lost entry '" + UTF8.String(entry.getKey()) + "' because importRowSet returned null"); continue; // thats a fail but not as REALLY bad if the whole method would crash here } return new ReferenceContainer(this.factory, entry.getKey(), row); } catch (final RowSpaceExceededException e) { - Log.logSevere("ReferenceIterator", "lost entry '" + entry.getKey() + "' because of too low memory: " + e.toString()); + Log.logSevere("ReferenceIterator", "lost entry '" + UTF8.String(entry.getKey()) + "' because of too low memory: " + e.toString()); continue; } catch (final Throwable e) { - Log.logSevere("ReferenceIterator", "lost entry '" + entry.getKey() + "' because of too error: " + e.toString()); + Log.logSevere("ReferenceIterator", "lost entry '" + UTF8.String(entry.getKey()) + "' because of error: " + e.toString()); continue; } } @@ -86,6 +88,7 @@ public class ReferenceIterator extends LookAhe this.blobs = null; } + @Override public CloneableIterator> clone(final Object modifier) { if (this.blobs != null) this.blobs.close(); this.blobs = null;