diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-15 11:46:31 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-06-15 11:46:31 +0200 |
commit | 7a77762961aee116e7179ea57f07e143d74aba1f (patch) | |
tree | 40d20ab8f8096bdfb662baf5c96e6725aadd4020 /src/libstore/local-fs-store.cc | |
parent | 25d64f3a30e4fe224224d0c0470204215f7e570c (diff) | |
parent | ef1b3f21b6e51007d82e8e894dd9ecec0d1c5207 (diff) |
Merge branch 'errors-phase-2' of https://github.com/bburdette/nix
Diffstat (limited to 'src/libstore/local-fs-store.cc')
-rw-r--r-- | src/libstore/local-fs-store.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc index aa5abd835..2d564a0d7 100644 --- a/src/libstore/local-fs-store.cc +++ b/src/libstore/local-fs-store.cc @@ -22,7 +22,7 @@ struct LocalStoreAccessor : public FSAccessor { Path storePath = store->toStorePath(path); if (!store->isValidPath(store->parseStorePath(storePath))) - throw InvalidPath(format("path '%1%' is not a valid store path") % storePath); + throw InvalidPath("path '%1%' is not a valid store path", storePath); return store->getRealStoreDir() + std::string(path, store->storeDir.size()); } @@ -33,11 +33,11 @@ struct LocalStoreAccessor : public FSAccessor struct stat st; if (lstat(realPath.c_str(), &st)) { if (errno == ENOENT || errno == ENOTDIR) return {Type::tMissing, 0, false}; - throw SysError(format("getting status of '%1%'") % path); + throw SysError("getting status of '%1%'", path); } if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode) && !S_ISLNK(st.st_mode)) - throw Error(format("file '%1%' has unsupported type") % path); + throw Error("file '%1%' has unsupported type", path); return { S_ISREG(st.st_mode) ? Type::tRegular : |