mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
all things error to error.hh
This commit is contained in:
parent
d9632765a8
commit
d8d4844b88
5 changed files with 30 additions and 167 deletions
|
@ -40,24 +40,6 @@ extern char * * environ;
|
|||
|
||||
namespace nix {
|
||||
|
||||
|
||||
const std::string nativeSystem = SYSTEM;
|
||||
|
||||
|
||||
BaseError & BaseError::addPrefix(const FormatOrString & fs)
|
||||
{
|
||||
prefix_ = fs.s + prefix_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
std::string SysError::addErrno(const std::string & s)
|
||||
{
|
||||
errNo = errno;
|
||||
return s + ": " + strerror(errNo);
|
||||
}
|
||||
|
||||
|
||||
std::optional<std::string> getEnv(const std::string & key)
|
||||
{
|
||||
char * value = getenv(key.c_str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue