1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 11:41: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:
Eelco Dolstra 2019-09-03 13:00:55 +02:00
parent 7348653ff4
commit f186000367
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
11 changed files with 19 additions and 18 deletions

View file

@ -55,7 +55,7 @@ void BinaryCacheStore::init()
}
void BinaryCacheStore::getFile(const std::string & path,
Callback<std::shared_ptr<std::string>> callback)
Callback<std::shared_ptr<std::string>> callback) noexcept
{
try {
callback(getFile(path));
@ -240,7 +240,7 @@ void BinaryCacheStore::narFromPath(const Path & storePath, Sink & sink)
}
void BinaryCacheStore::queryPathInfoUncached(const Path & storePath,
Callback<std::shared_ptr<ValidPathInfo>> callback)
Callback<std::shared_ptr<ValidPathInfo>> callback) noexcept
{
auto uri = getUri();
auto act = std::make_shared<Activity>(*logger, lvlTalkative, actQueryPathInfo,