diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-05-30 13:24:04 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-05-30 13:24:04 +0200 |
commit | b8faa837429cbcb4f950248571c761c98895e7cd (patch) | |
tree | eb4bec7dc42ef229b7fcab5a38c107ebc95874f5 /src/libstore | |
parent | ec07a70979a86cc436de7e46e03789b4606d25ab (diff) |
HttpBinaryCacheStore::getFile(): Don't throw an exception
This violates the noexcept specification.
Fixes #6445.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/http-binary-cache-store.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index 3cb5efdbf..73bcd6e81 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -161,7 +161,12 @@ protected: void getFile(const std::string & path, Callback<std::optional<std::string>> callback) noexcept override { - checkEnabled(); + try { + checkEnabled(); + } catch (...) { + callback.rethrow(); + return; + } auto request(makeRequest(path)); |