forked from lix-project/lix
RemoteStore::queryRealisationUncached(): Fix potential noexcept violation
This commit is contained in:
parent
b8faa83742
commit
6378f0bb32
|
@ -718,13 +718,12 @@ void RemoteStore::registerDrvOutput(const Realisation & info)
|
||||||
void RemoteStore::queryRealisationUncached(const DrvOutput & id,
|
void RemoteStore::queryRealisationUncached(const DrvOutput & id,
|
||||||
Callback<std::shared_ptr<const Realisation>> callback) noexcept
|
Callback<std::shared_ptr<const Realisation>> callback) noexcept
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
auto conn(getConnection());
|
auto conn(getConnection());
|
||||||
|
|
||||||
if (GET_PROTOCOL_MINOR(conn->daemonVersion) < 27) {
|
if (GET_PROTOCOL_MINOR(conn->daemonVersion) < 27) {
|
||||||
warn("the daemon is too old to support content-addressed derivations, please upgrade it to 2.4");
|
warn("the daemon is too old to support content-addressed derivations, please upgrade it to 2.4");
|
||||||
try {
|
return callback(nullptr);
|
||||||
callback(nullptr);
|
|
||||||
} catch (...) { return callback.rethrow(); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
conn->to << wopQueryRealisation;
|
conn->to << wopQueryRealisation;
|
||||||
|
@ -747,7 +746,6 @@ void RemoteStore::queryRealisationUncached(const DrvOutput & id,
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
try {
|
|
||||||
callback(std::shared_ptr<const Realisation>(real));
|
callback(std::shared_ptr<const Realisation>(real));
|
||||||
} catch (...) { return callback.rethrow(); }
|
} catch (...) { return callback.rethrow(); }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue