diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-07-12 15:04:46 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-07-12 15:04:46 +0200 |
commit | 91d2e8d5adf8d4ac941faef5cb3a020f07238db9 (patch) | |
tree | 66b46222f1784d7da331031ce2de69430556c96f /src/libstore/profiles.cc | |
parent | 8d97030bfd4a9ce7b94fc870746c73ff472622d0 (diff) |
Error -> UsageError
Diffstat (limited to 'src/libstore/profiles.cc')
-rw-r--r-- | src/libstore/profiles.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc index 75db8f9df..84a21c0ba 100644 --- a/src/libstore/profiles.cc +++ b/src/libstore/profiles.cc @@ -212,14 +212,14 @@ void deleteGenerationsOlderThan(const Path & profile, time_t t, bool dryRun) void deleteGenerationsOlderThan(const Path & profile, const string & timeSpec, bool dryRun) { if (timeSpec.empty() || timeSpec[timeSpec.size() - 1] != 'd') - throw Error("invalid number of days specifier '%1%', expected something like '14d'", timeSpec); + throw UsageError("invalid number of days specifier '%1%', expected something like '14d'", timeSpec); time_t curTime = time(0); string strDays = string(timeSpec, 0, timeSpec.size() - 1); auto days = string2Int<int>(strDays); if (!days || *days < 1) - throw Error("invalid number of days specifier '%1%'", timeSpec); + throw UsageError("invalid number of days specifier '%1%'", timeSpec); time_t oldTime = curTime - *days * 24 * 3600; |