Don't show calls to primops in stack traces

Since they don't have location information, they just give you crap
like:

  while evaluating the builtin function `getAttr':
  while evaluating the builtin function `derivationStrict':
  ...
This commit is contained in:
Eelco Dolstra 2013-10-05 21:29:48 +00:00
parent c945f015de
commit 176c666f36
1 changed files with 1 additions and 6 deletions

View File

@ -728,12 +728,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v)
/* And call the primop. */
nrPrimOpCalls++;
if (countCalls) primOpCalls[primOp->primOp->name]++;
try {
primOp->primOp->fun(*this, vArgs, v);
} catch (Error & e) {
addErrorPrefix(e, "while evaluating the builtin function `%1%':\n", primOp->primOp->name);
throw;
}
primOp->primOp->fun(*this, vArgs, v);
} else {
v.type = tPrimOpApp;
v.primOpApp.left = allocValue();