mirror of
https://github.com/NixOS/nix
synced 2025-06-26 11:41:15 +02:00
refact: TraceKind -> TracePrint
Co-authored-by: Rebecca Turner <rbt@sent.as>
This commit is contained in:
parent
bed541b04e
commit
d4fa0a84a5
3 changed files with 16 additions and 10 deletions
|
@ -11,9 +11,9 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
void BaseError::addTrace(std::shared_ptr<Pos> && e, HintFmt hint, TraceKind kind)
|
||||
void BaseError::addTrace(std::shared_ptr<Pos> && e, HintFmt hint, TracePrint print)
|
||||
{
|
||||
err.traces.push_front(Trace { .pos = std::move(e), .hint = hint, .kind = kind });
|
||||
err.traces.push_front(Trace { .pos = std::move(e), .hint = hint, .print = print });
|
||||
}
|
||||
|
||||
void throwExceptionSelfCheck(){
|
||||
|
@ -388,7 +388,7 @@ std::ostream & showErrorInfo(std::ostream & out, const ErrorInfo & einfo, bool s
|
|||
truncate = true;
|
||||
}
|
||||
|
||||
if (!truncate || trace.kind == TraceKind::Custom) {
|
||||
if (!truncate || trace.print == TracePrint::Always) {
|
||||
|
||||
if (tracesSeen.count(trace)) {
|
||||
skippedTraces.push_back(trace);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue