1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-30 14:10:59 +01: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:
Eelco Dolstra 2022-09-28 17:01:16 +02:00
parent a291e37b20
commit c3c0682842
3 changed files with 9 additions and 4 deletions

View file

@ -30,12 +30,12 @@ const std::string & BaseError::calcWhat() const
std::optional<std::string> ErrorInfo::programName = std::nullopt;
std::ostream & operator<<(std::ostream & os, const hintformat & hf)
std::ostream & operator <<(std::ostream & os, const hintformat & hf)
{
return os << hf.str();
}
std::ostream & operator << (std::ostream & str, const AbstractPos & pos)
std::ostream & operator <<(std::ostream & str, const AbstractPos & pos)
{
pos.print(str);
str << ":" << pos.line;