Don't squash caught errors, please (#15046)
* Don't squash caught errors, please * Update blockstore.rs * Update blockstore.rs
This commit is contained in:
parent
4324374ab5
commit
8376781ec8
|
@ -487,8 +487,9 @@ impl Blockstore {
|
||||||
Ok(meta_iter.map(|(slot, slot_meta_bytes)| {
|
Ok(meta_iter.map(|(slot, slot_meta_bytes)| {
|
||||||
(
|
(
|
||||||
slot,
|
slot,
|
||||||
deserialize(&slot_meta_bytes)
|
deserialize(&slot_meta_bytes).unwrap_or_else(|e| {
|
||||||
.unwrap_or_else(|_| panic!("Could not deserialize SlotMeta for slot {}", slot)),
|
panic!("Could not deserialize SlotMeta for slot {}: {:?}", slot, e)
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
@ -2598,10 +2599,11 @@ impl Blockstore {
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
debug!("{:?} shreds in last FEC set", data_shreds.len(),);
|
debug!("{:?} shreds in last FEC set", data_shreds.len(),);
|
||||||
bincode::deserialize::<Vec<Entry>>(&deshred_payload).map_err(|_| {
|
bincode::deserialize::<Vec<Entry>>(&deshred_payload).map_err(|e| {
|
||||||
BlockstoreError::InvalidShredData(Box::new(bincode::ErrorKind::Custom(
|
BlockstoreError::InvalidShredData(Box::new(bincode::ErrorKind::Custom(format!(
|
||||||
"could not reconstruct entries".to_string(),
|
"could not reconstruct entries: {:?}",
|
||||||
)))
|
e
|
||||||
|
))))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue