From fda08b20b49da4cf10c611159847f3a10360caf5 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Sun, 26 Jun 2022 21:32:23 +0100 Subject: [PATCH] Add context for unreadable rakepacks --- quickpeep_indexer/src/bin/qp-indexer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickpeep_indexer/src/bin/qp-indexer.rs b/quickpeep_indexer/src/bin/qp-indexer.rs index f9194e6..332ca3c 100644 --- a/quickpeep_indexer/src/bin/qp-indexer.rs +++ b/quickpeep_indexer/src/bin/qp-indexer.rs @@ -70,7 +70,8 @@ pub async fn main() -> anyhow::Result<()> { let decompressor = zstd::stream::Decoder::new(file)?; // TODO the decompressor has a buffer already, but we need this to see the end let mut buf_reader = BufReader::new(decompressor); - let schema: String = serde_bare::from_reader(&mut buf_reader)?; + let schema: String = + serde_bare::from_reader(&mut buf_reader).context("failed to read schema ver")?; match schema.as_ref() { SCHEMA_RAKED_PAGES => {