mirror of
https://github.com/NixOS/nix
synced 2025-07-06 05:01:48 +02:00
Remove the concept of "skipped frames"
This commit is contained in:
parent
040874e4db
commit
f05c13ecc2
7 changed files with 16 additions and 28 deletions
|
@ -11,9 +11,9 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
void BaseError::addTrace(std::shared_ptr<Pos> && e, HintFmt hint, bool frame)
|
||||
void BaseError::addTrace(std::shared_ptr<Pos> && e, HintFmt hint)
|
||||
{
|
||||
err.traces.push_front(Trace { .pos = std::move(e), .hint = hint, .frame = frame });
|
||||
err.traces.push_front(Trace { .pos = std::move(e), .hint = hint });
|
||||
}
|
||||
|
||||
void throwExceptionSelfCheck(){
|
||||
|
@ -61,8 +61,7 @@ inline bool operator<(const Trace& lhs, const Trace& rhs)
|
|||
// This formats a freshly formatted hint string and then throws it away, which
|
||||
// shouldn't be much of a problem because it only runs when pos is equal, and this function is
|
||||
// used for trace printing, which is infrequent.
|
||||
return std::forward_as_tuple(lhs.hint.str(), lhs.frame)
|
||||
< std::forward_as_tuple(rhs.hint.str(), rhs.frame);
|
||||
return lhs.hint.str() < rhs.hint.str();
|
||||
}
|
||||
inline bool operator> (const Trace& lhs, const Trace& rhs) { return rhs < lhs; }
|
||||
inline bool operator<=(const Trace& lhs, const Trace& rhs) { return !(lhs > rhs); }
|
||||
|
|
|
@ -64,7 +64,6 @@ void printCodeLines(std::ostream & out,
|
|||
struct Trace {
|
||||
std::shared_ptr<Pos> pos;
|
||||
HintFmt hint;
|
||||
bool frame;
|
||||
};
|
||||
|
||||
inline bool operator<(const Trace& lhs, const Trace& rhs);
|
||||
|
@ -162,7 +161,7 @@ public:
|
|||
addTrace(std::move(e), HintFmt(std::string(fs), args...));
|
||||
}
|
||||
|
||||
void addTrace(std::shared_ptr<Pos> && e, HintFmt hint, bool frame = false);
|
||||
void addTrace(std::shared_ptr<Pos> && e, HintFmt hint);
|
||||
|
||||
bool hasTrace() const { return !err.traces.empty(); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue