Skip to content

Commit

Permalink
Improvement: Log the thrown error while validating extracted package …
Browse files Browse the repository at this point in the history
…cache (#1608)
  • Loading branch information
johnhany97 authored Apr 1, 2022
1 parent 5a61ae2 commit d8cd9c5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions libmamba/src/core/package_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,16 @@ namespace mamba
<< "' has invalid 'repodata_record.json' file: " << e.what();
valid = false;
}
catch (...)
catch (const std::runtime_error& re)
{
LOG_WARNING << "Extracted package cache '" << extracted_dir.string()
<< "' is invalid'";
<< " couldn't be validated due to runtime error: " << re.what();
valid = false;
}
catch (const std::exception& ex)
{
LOG_WARNING << "Extracted package cache '" << extracted_dir.string()
<< " couldn't be validated due to error: " << ex.what();
valid = false;
}

Expand Down

0 comments on commit d8cd9c5

Please sign in to comment.