mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
Add some noexcepts
This is to assert that callback functions should never throw (since the context in which they're called may not be able to handle the exception).
This commit is contained in:
parent
7348653ff4
commit
f186000367
11 changed files with 19 additions and 18 deletions
|
@ -329,13 +329,14 @@ ref<const ValidPathInfo> Store::queryPathInfo(const Path & storePath)
|
|||
|
||||
|
||||
void Store::queryPathInfo(const Path & storePath,
|
||||
Callback<ref<ValidPathInfo>> callback)
|
||||
Callback<ref<ValidPathInfo>> callback) noexcept
|
||||
{
|
||||
assertStorePath(storePath);
|
||||
|
||||
auto hashPart = storePathToHash(storePath);
|
||||
std::string hashPart;
|
||||
|
||||
try {
|
||||
assertStorePath(storePath);
|
||||
|
||||
hashPart = storePathToHash(storePath);
|
||||
|
||||
{
|
||||
auto res = state.lock()->pathInfoCache.get(hashPart);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue