From a520b1cbc3327dfb8e3c6f503dfd0bd41e0a6d55 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 2 Apr 2004 10:49:37 +0000 Subject: [PATCH] * Print a more useful error message in case of an invalid derivation binding. --- src/libexpr/primops.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 5aefa5b411..835a3217f3 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -181,7 +181,12 @@ Expr primDerivation(EvalState & state, Expr args) startNest(nest, lvlVomit, format("processing attribute `%1%'") % key); Strings ss; - processBinding(state, value, ne, ss); + try { + processBinding(state, value, ne, ss); + } catch (Error & e) { + throw Error(format("while processing derivation binding `%1%': %2%") + % key % e.msg()); + } /* The `args' attribute is special: it supplies the command-line arguments to the builder. */