forked from lix-project/lix
Disambiguate BaseError(Args) constructor
This means that 'throw Error({ ... ErrorInfo ... })' now works.
This commit is contained in:
parent
7a77762961
commit
fd64e4fb96
|
@ -506,8 +506,7 @@ LocalNoInlineNoReturn(void throwEvalError(const char * s, const string & s2))
|
||||||
|
|
||||||
LocalNoInlineNoReturn(void throwEvalError(const Pos & pos, const char * s, const string & s2))
|
LocalNoInlineNoReturn(void throwEvalError(const Pos & pos, const char * s, const string & s2))
|
||||||
{
|
{
|
||||||
throw EvalError(
|
throw EvalError({
|
||||||
ErrorInfo {
|
|
||||||
.hint = hintfmt(s, s2),
|
.hint = hintfmt(s, s2),
|
||||||
.nixCode = NixCode { .errPos = pos }
|
.nixCode = NixCode { .errPos = pos }
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include "ref.hh"
|
#include "ref.hh"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
@ -25,7 +24,6 @@ typedef string Path;
|
||||||
typedef list<Path> Paths;
|
typedef list<Path> Paths;
|
||||||
typedef set<Path> PathSet;
|
typedef set<Path> PathSet;
|
||||||
|
|
||||||
|
|
||||||
/* Helper class to run code at startup. */
|
/* Helper class to run code at startup. */
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct OnStartup
|
struct OnStartup
|
||||||
|
@ -33,5 +31,4 @@ struct OnStartup
|
||||||
OnStartup(T && t) { t(); }
|
OnStartup(T && t) { t(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue