mirror of
https://github.com/NixOS/nix.git
synced 2025-11-25 11:49:35 +01:00
Improve error message for self reference with text hashing
The `ContentAddressWithReferences` method is made total, with error handling now squarely the caller's job. This is better.
This commit is contained in:
parent
e514b3939a
commit
6a3a87a714
3 changed files with 34 additions and 21 deletions
|
|
@ -303,10 +303,11 @@ struct ContentAddressWithReferences
|
|||
*
|
||||
* @param refs References to other store objects or oneself.
|
||||
*
|
||||
* Do note that not all combinations are supported.
|
||||
* Do note that not all combinations are supported; `nullopt` is
|
||||
* returns for invalid combinations.
|
||||
*/
|
||||
static ContentAddressWithReferences fromParts(
|
||||
ContentAddressMethod method, Hash hash, StoreReferences refs);
|
||||
static std::optional<ContentAddressWithReferences> fromPartsOpt(
|
||||
ContentAddressMethod method, Hash hash, StoreReferences refs) noexcept;
|
||||
|
||||
ContentAddressMethod getMethod() const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue