catch all parse errors.
This commit is contained in:
parent
9bf1c6de13
commit
692f2c7cf0
@ -411,7 +411,11 @@ ChainDB.prototype._getEntry = function _getEntry(hash, callback) {
|
||||
if (!data)
|
||||
return callback();
|
||||
|
||||
entry = bcoin.chainblock.fromRaw(self.chain, data);
|
||||
try {
|
||||
entry = bcoin.chainblock.fromRaw(self.chain, data);
|
||||
} catch (e) {
|
||||
return callback(e);
|
||||
}
|
||||
|
||||
return callback(null, entry);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user