mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 00:32:28 +00:00
Catch Error
, not BaseError
in ValuePrinter
`BaseError` includes `Interrupt`. We probably don't want the value printer to tell you you pressed Ctrl-C while it was working.
This commit is contained in:
parent
49cf090cb2
commit
a7927abdc1
@ -255,7 +255,7 @@ private:
|
|||||||
output << "»";
|
output << "»";
|
||||||
if (options.ansiColors)
|
if (options.ansiColors)
|
||||||
output << ANSI_NORMAL;
|
output << ANSI_NORMAL;
|
||||||
} catch (BaseError & e) {
|
} catch (Error & e) {
|
||||||
printError_(e);
|
printError_(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -405,7 +405,7 @@ private:
|
|||||||
output << ANSI_NORMAL;
|
output << ANSI_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void printError_(BaseError & e)
|
void printError_(Error & e)
|
||||||
{
|
{
|
||||||
if (options.ansiColors)
|
if (options.ansiColors)
|
||||||
output << ANSI_RED;
|
output << ANSI_RED;
|
||||||
@ -422,7 +422,7 @@ private:
|
|||||||
if (options.force) {
|
if (options.force) {
|
||||||
try {
|
try {
|
||||||
state.forceValue(v, v.determinePos(noPos));
|
state.forceValue(v, v.determinePos(noPos));
|
||||||
} catch (BaseError & e) {
|
} catch (Error & e) {
|
||||||
printError_(e);
|
printError_(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user