* Turn build errors during evaluation into EvalErrors.
This commit is contained in:
parent
8bcdd36f10
commit
89865da76d
|
@ -15,6 +15,7 @@ MakeError(AssertionError, EvalError)
|
|||
MakeError(ThrownError, AssertionError)
|
||||
MakeError(Abort, EvalError)
|
||||
MakeError(TypeError, EvalError)
|
||||
MakeError(ImportError, EvalError) // error building an imported derivation
|
||||
|
||||
|
||||
/* Position objects. */
|
||||
|
|
|
@ -37,7 +37,11 @@ static void prim_import(EvalState & state, Value * * args, Value & v)
|
|||
throw EvalError(format("cannot import `%1%', since path `%2%' is not valid")
|
||||
% path % *i);
|
||||
if (isDerivation(*i))
|
||||
store->buildDerivations(singleton<PathSet>(*i));
|
||||
try {
|
||||
store->buildDerivations(singleton<PathSet>(*i));
|
||||
} catch (Error & e) {
|
||||
throw ImportError(e.msg());
|
||||
}
|
||||
}
|
||||
|
||||
state.evalFile(path, v);
|
||||
|
|
|
@ -267,7 +267,7 @@ public:
|
|||
|
||||
|
||||
MakeError(SubstError, Error)
|
||||
MakeError(BuildError, Error) /* denoted a permanent build failure */
|
||||
MakeError(BuildError, Error) /* denotes a permanent build failure */
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -16,8 +16,6 @@ namespace nix {
|
|||
typedef std::map<Path, Path> Roots;
|
||||
|
||||
|
||||
|
||||
|
||||
struct GCOptions
|
||||
{
|
||||
/* Garbage collector operation:
|
||||
|
|
Loading…
Reference in a new issue