From 7d9653d51fb0c4d3844f61e1214b6bddc50d2cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 21 Mar 2023 23:38:18 +0100 Subject: =?UTF-8?q?Revert=20"fix(cli)=20Better=20error=20messages=20on=20c?= =?UTF-8?q?orrupt=20databases=20that=20aren=E2=80=A6=20(#18337)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …'t automatically re-created (#18330)" This reverts commit 2ef8269fdb395b0736153ff5fbb9696cbb976e42. Printing these messages by default (instead of requiring `-L debug` flag) caused various tests to start printing it and mismatch in output assertions. --- cli/cache/node.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'cli/cache/node.rs') diff --git a/cli/cache/node.rs b/cli/cache/node.rs index 2f1b1f55f..b19772229 100644 --- a/cli/cache/node.rs +++ b/cli/cache/node.rs @@ -106,16 +106,11 @@ impl NodeAnalysisCache { ) { Ok(cache) => Some(cache), Err(err) => { - let file = self - .db_file_path - .as_ref() - .map(|s| s.to_string_lossy().to_string()) - .unwrap_or_default(); - log::error!("Error creating node analysis cache, file '{file}' may be corrupt: {:#}", err); // should never error here, but if it ever does don't fail if cfg!(debug_assertions) { - panic!("Error creating node analysis cache, file '{file}' may be corrupt: {err:#}"); + panic!("Error creating node analysis cache: {err:#}"); } else { + log::debug!("Error creating node analysis cache: {:#}", err); None } } -- cgit v1.2.3