mirror of
https://github.com/NixOS/nix
synced 2025-06-29 23:13:14 +02:00
Don't show "from call site" when we don't know the call site
This gets rid of stack trace entries like … from call site at «stdin»:0: (source not available)
This commit is contained in:
parent
a291e37b20
commit
c3c0682842
3 changed files with 9 additions and 4 deletions
|
@ -1617,7 +1617,8 @@ void EvalState::callFunction(Value & fun, size_t nrArgs, Value * * args, Value &
|
||||||
(lambda.name
|
(lambda.name
|
||||||
? concatStrings("'", symbols[lambda.name], "'")
|
? concatStrings("'", symbols[lambda.name], "'")
|
||||||
: "anonymous lambda"));
|
: "anonymous lambda"));
|
||||||
addErrorTrace(e, pos, "from call site%s", "");
|
if (pos != noPos)
|
||||||
|
addErrorTrace(e, pos, "from call site", "");
|
||||||
}
|
}
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,10 @@ public:
|
||||||
explicit operator bool() const { return id > 0; }
|
explicit operator bool() const { return id > 0; }
|
||||||
|
|
||||||
bool operator <(const PosIdx other) const { return id < other.id; }
|
bool operator <(const PosIdx other) const { return id < other.id; }
|
||||||
|
|
||||||
|
bool operator ==(const PosIdx other) const { return id == other.id; }
|
||||||
|
|
||||||
|
bool operator !=(const PosIdx other) const { return id != other.id; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class PosTable
|
class PosTable
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue