daemon: Replace "illegal" by "invalid" in error messages.

* nix/libstore/build.cc (parseReferenceSpecifiers): Replace "illegal" by
"invalid".
* nix/libstore/globals.cc (Settings::pack): Likewise.
* nix/libstore/store-api.cc (checkStoreName): Likewise.
master
Ludovic Courtès 2019-06-12 23:11:37 +02:00
parent bd9b15fb31
commit 76533c52c0
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
3 changed files with 3 additions and 3 deletions

View File

@ -2348,7 +2348,7 @@ PathSet parseReferenceSpecifiers(const Derivation & drv, string attr)
else if (drv.outputs.find(*i) != drv.outputs.end())
result.insert(drv.outputs.find(*i)->second.path);
else throw BuildError(
format("derivation contains an illegal reference specifier `%1%'")
format("derivation contains an invalid reference specifier `%1%'")
% *i);
}
return result;

View File

@ -196,7 +196,7 @@ string Settings::pack()
if (i->first.find('\n') != string::npos ||
i->first.find('=') != string::npos ||
i->second.find('\n') != string::npos)
throw Error("illegal option name/value");
throw Error("invalid option name/value");
s += i->first; s += '='; s += i->second; s += '\n';
}
return s;

View File

@ -61,7 +61,7 @@ void checkStoreName(const string & name)
/* Disallow names starting with a dot for possible security
reasons (e.g., "." and ".."). */
if (string(name, 0, 1) == ".")
throw Error(format("illegal name: `%1%'") % name);
throw Error(format("invalid name: `%1%'") % name);
foreach (string::const_iterator, i, name)
if (!((*i >= 'A' && *i <= 'Z') ||
(*i >= 'a' && *i <= 'z') ||