From 6c311a4afa339b5dc4f80f03e29c9e7fe779abd5 Mon Sep 17 00:00:00 2001 From: julia Date: Sat, 18 May 2024 18:57:38 +1000 Subject: Add a clearer error message for InvalidPathError during evaluation Part of #270, #271 Change-Id: I864d7340f26d3c0f9c45db7b6b545face38d8294 --- src/libstore/store-api.hh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index de4dc3f03..186437f43 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -62,10 +62,18 @@ MakeError(SubstError, Error); * denotes a permanent build failure */ MakeError(BuildError, Error); +/** + * denotes that a path in the store did not exist (but it could, had it + * been put there, i.e. it is still legal). + */ MakeError(InvalidPath, Error); MakeError(Unsupported, Error); MakeError(SubstituteGone, Error); MakeError(SubstituterDisabled, Error); +/** + * denotes that a path could not possibly be a store path. + * e.g. outside of the nix store, illegal characters in the name, etc. +*/ MakeError(BadStorePath, Error); MakeError(InvalidStoreURI, Error); @@ -328,6 +336,7 @@ public: /** * Check whether a path is valid. + * A path is valid when it exists in the store *now*. */ bool isValidPath(const StorePath & path); -- cgit v1.2.3