about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 5aefa5b411b0..835a3217f3b0 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. */