FSAccessor: Throw InvalidPath

This commit is contained in:
Eelco Dolstra 2016-08-09 11:46:27 +02:00
parent f43823f676
commit 6cb4bdf152
2 changed files with 2 additions and 2 deletions

View file

@ -254,7 +254,7 @@ struct BinaryCacheStoreAccessor : public FSAccessor
std::string restPath = std::string(path, storePath.size());
if (!store->isValidPath(storePath))
throw Error(format("path %1% is not a valid store path") % storePath);
throw InvalidPath(format("path %1% is not a valid store path") % storePath);
auto i = nars.find(storePath);
if (i != nars.end()) return {i->second, restPath};

View file

@ -23,7 +23,7 @@ struct LocalStoreAccessor : public FSAccessor
{
Path storePath = store->toStorePath(path);
if (!store->isValidPath(storePath))
throw Error(format("path %1% is not a valid store path") % storePath);
throw InvalidPath(format("path %1% is not a valid store path") % storePath);
return store->getRealStoreDir() + std::string(path, store->storeDir.size());
}