Merge branch 'master' into caveman-LOCs

This commit is contained in:
Ben Burdette
2020-06-18 13:07:53 -06:00
124 changed files with 1435 additions and 1315 deletions
+10 -5
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)
{ }