1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +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

@ -47,7 +47,7 @@ public:
/* Fetch the specified file and call the specified callback with
the result. A subclass may implement this asynchronously. */
virtual void getFile(const std::string & path,
Callback<std::shared_ptr<std::string>> callback);
Callback<std::shared_ptr<std::string>> callback) noexcept;
std::shared_ptr<std::string> getFile(const std::string & path);
@ -73,7 +73,7 @@ public:
bool isValidPathUncached(const Path & path) override;
void queryPathInfoUncached(const Path & path,
Callback<std::shared_ptr<ValidPathInfo>> callback) override;
Callback<std::shared_ptr<ValidPathInfo>> callback) noexcept override;
Path queryPathFromHashPart(const string & hashPart) override
{ unsupported("queryPathFromHashPart"); }