aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/profiles.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-04-21 17:07:07 -0600
committerBen Burdette <bburdette@gmail.com>2020-04-21 17:07:07 -0600
commite4fb9a38493a041861fe5c75bc8ddd129a2e5262 (patch)
tree114bedc4dd31da6ebaf6e9b2ebe5f3d6b7b6d274 /src/libstore/profiles.cc
parentd3052197feababc312fd874e08ae48050d985eb3 (diff)
remove 'format' from Error constructor calls
Diffstat (limited to 'src/libstore/profiles.cc')
-rw-r--r--src/libstore/profiles.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc
index 2bef51878..6cfe393a4 100644
--- a/src/libstore/profiles.cc
+++ b/src/libstore/profiles.cc
@@ -50,7 +50,7 @@ Generations findGenerations(Path profile, int & curGen)
gen.number = n;
struct stat st;
if (lstat(gen.path.c_str(), &st) != 0)
- throw SysError(format("statting '%1%'") % gen.path);
+ throw SysError("statting '%1%'", gen.path);
gen.creationTime = st.st_mtime;
gens.push_back(gen);
}
@@ -117,7 +117,7 @@ Path createGeneration(ref<LocalFSStore> store, Path profile, Path outPath)
static void removeFile(const Path & path)
{
if (remove(path.c_str()) == -1)
- throw SysError(format("cannot unlink '%1%'") % path);
+ throw SysError("cannot unlink '%1%'", path);
}
@@ -149,7 +149,7 @@ void deleteGenerations(const Path & profile, const std::set<unsigned int> & gens
Generations gens = findGenerations(profile, curGen);
if (gensToDelete.find(curGen) != gensToDelete.end())
- throw Error(format("cannot delete current generation of profile %1%'") % profile);
+ throw Error("cannot delete current generation of profile %1%'", profile);
for (auto & i : gens) {
if (gensToDelete.find(i.number) == gensToDelete.end()) continue;
@@ -226,7 +226,7 @@ void deleteGenerationsOlderThan(const Path & profile, const string & timeSpec, b
int days;
if (!string2Int(strDays, days) || days < 1)
- throw Error(format("invalid number of days specifier '%1%'") % timeSpec);
+ throw Error("invalid number of days specifier '%1%'", timeSpec);
time_t oldTime = curTime - days * 24 * 3600;