diff options
author | julia <midnight@trainwit.ch> | 2024-05-18 20:16:32 +1000 |
---|---|---|
committer | julia <midnight@trainwit.ch> | 2024-06-16 03:55:39 +0000 |
commit | 89c782b0c0df6ca9d85207b62318e70729f18e24 (patch) | |
tree | 23db3e1956fe8c2e05edc05626bec27e3695bff6 /src/libstore/local-store.cc | |
parent | 6c311a4afa339b5dc4f80f03e29c9e7fe779abd5 (diff) |
Change error messages about 'invalid paths' to 'path does not exist'.
Fixes #270.
Change-Id: I07d2da41498cfdf324a03af40533044d58c97c7e
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index bae5fad7b..5bdf0362d 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -907,7 +907,7 @@ std::shared_ptr<const ValidPathInfo> LocalStore::queryPathInfoInternal(State & s try { narHash = Hash::parseAnyPrefixed(useQueryPathInfo.getStr(1)); } catch (BadHash & e) { - throw Error("invalid-path entry for '%s': %s", printStorePath(path), e.what()); + throw BadStorePath("bad hash in store path '%s': %s", printStorePath(path), e.what()); } auto info = std::make_shared<ValidPathInfo>(path, narHash); @@ -957,8 +957,8 @@ void LocalStore::updatePathInfo(State & state, const ValidPathInfo & info) uint64_t LocalStore::queryValidPathId(State & state, const StorePath & path) { auto use(state.stmts->QueryPathInfo.use()(printStorePath(path))); - if (!use.next()) - throw InvalidPath("path '%s' is not valid", printStorePath(path)); + if (!use.next()) // TODO: I guess if SQLITE got corrupted..? + throw InvalidPath("path '%s' does not exist", printStorePath(path)); return use.getInt(0); } |