about summary refs log tree commit diff
path: root/src/nix-instantiate/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-04-05T22·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-04-05T22·27+0000
commit59b94ee18ac0cba5c7b261ee72550a4d3db0acb5 (patch)
tree9dbe6721699439cda3ce68ac86acbe38e9839e66 /src/nix-instantiate/main.cc
parenta520b1cbc3327dfb8e3c6f503dfd0bd41e0a6d55 (diff)
* When something goes wrong in the evaluation of a Nix expression,
  print a nice backtrace of the stack, rather than vomiting a gigantic
  (and useless) aterm on the screen.  Example:

    error: while evaluating file `.../pkgs/system/test.nix':
    while evaluating attribute `subversion' at `.../pkgs/system/all-packages-generic.nix', line 533:
    while evaluating function at `.../pkgs/applications/version-management/subversion/default.nix', line 1:
    assertion failed at `.../pkgs/applications/version-management/subversion/default.nix', line 13

  Since the Nix expression language is lazy, the trace may be
  misleading.  The purpose is to provide a hint as to the location of
  the problem.    
  

Diffstat (limited to 'src/nix-instantiate/main.cc')
-rw-r--r--src/nix-instantiate/main.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-instantiate/main.cc b/src/nix-instantiate/main.cc
index cc3444837c..5ef6bd7d1b 100644
--- a/src/nix-instantiate/main.cc
+++ b/src/nix-instantiate/main.cc
@@ -47,7 +47,7 @@ static void printNixExpr(EvalState & state, Expr e)
         return;
     }
 
-    throw badTerm("top level does not evaluate to one or more Nix expressions", e);
+    throw Error("expression does not evaluate to one or more derivations");
 }