1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 01:11:15 +02:00

Merge branch 'master' into caveman-LOCs

This commit is contained in:
Ben Burdette 2020-06-18 13:07:53 -06:00
commit e6f93b94fc
124 changed files with 1435 additions and 1315 deletions

View file

@ -4,6 +4,7 @@
#include "ref.hh"
#include "types.hh"
#include <cstring>
#include <list>
#include <memory>
#include <map>
@ -22,7 +23,7 @@
namespace nix {
/*
/*
This file defines two main structs/classes used in nix error handling.
@ -114,7 +115,7 @@ protected:
mutable std::optional<string> what_;
const string& calcWhat() const;
public:
unsigned int status = 1; // exit status
@ -127,9 +128,9 @@ public:
{ }
template<typename... Args>
BaseError(const Args & ... args)
BaseError(const std::string & fs, const Args & ... args)
: err { .level = lvlError,
.hint = hintfmt(args...)
.hint = hintfmt(fs, args...)
}
{ }
@ -139,7 +140,11 @@ public:
}
{ }
BaseError(ErrorInfo e)
BaseError(ErrorInfo && e)
: err(std::move(e))
{ }
BaseError(const ErrorInfo & e)
: err(e)
{ }