diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-03-21 11:19:10 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 17:19:10 +0000 |
commit | 2ef8269fdb395b0736153ff5fbb9696cbb976e42 (patch) | |
tree | e21f13ca5c465b399929efc1a5f18cb2d137e0ef /cli/cache/parsed_source.rs | |
parent | 08849a48ca8f7d59cd7d2fc51dcc8ec02a216030 (diff) |
fix(cli) Better error messages on corrupt databases that aren't automatically re-created (#18330)
Diffstat (limited to 'cli/cache/parsed_source.rs')
-rw-r--r-- | cli/cache/parsed_source.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/cache/parsed_source.rs b/cli/cache/parsed_source.rs index b6a80e82e..461ac6dce 100644 --- a/cli/cache/parsed_source.rs +++ b/cli/cache/parsed_source.rs @@ -121,7 +121,12 @@ impl ParsedSourceCache { ) { Ok(analyzer) => Box::new(analyzer), Err(err) => { - log::debug!("Could not create cached module analyzer. {:#}", err); + let file = self + .db_cache_path + .as_ref() + .map(|s| s.to_string_lossy().to_string()) + .unwrap_or_default(); + log::error!("Could not create cached module analyzer, cache file '{file}' may be corrupt: {:#}", err); // fallback to not caching if it can't be created Box::new(deno_graph::CapturingModuleAnalyzer::new( None, |