Skip to content

Commit

Permalink
index: on reindexing, print error details to stderr
Browse files Browse the repository at this point in the history
It's not ideal to print the error there, but using stderr should be slightly
better. It could be a tracing message, but tracing won't be displayed by
default.
  • Loading branch information
yuja committed Feb 12, 2024
1 parent a252a0d commit 9fcb35e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/default_index/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ impl IndexStore for DefaultIndexStore {
// If the index was corrupt (maybe it was written in a different format),
// we just reindex.
// TODO: Move this message to a callback or something.
println!("The index was corrupt (maybe the format has changed). Reindexing...");
eprintln!("{err}: {source}. Reindexing...", source = err.error);
self.reinit().map_err(|err| IndexReadError(err.into()))?;
self.build_index_segments_at_operation(op, store)
}
Expand Down

0 comments on commit 9fcb35e

Please sign in to comment.