Fix crash in case wallet is so inconsistent that even .toString() fails.

This commit is contained in:
Andreas Schildbach 2014-02-15 09:59:46 +01:00
parent b52faae013
commit d772244dc9

View File

@ -531,7 +531,13 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
}
}
if (!success) log.error(toString());
if (!success) {
try {
log.error(toString());
} catch (RuntimeException x) {
log.error("Printing inconsistent wallet failed", x);
}
}
return success;
} finally {
lock.unlock();