mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-19 17:46:46 +02:00
Merge pull request #9927 from 9999years/catch-error-in-value-printer
Catch `Error`, not `BaseError` in `ValuePrinter`
This commit is contained in:
commit
c291d2d8dd
1 changed files with 3 additions and 3 deletions
|
@ -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 a new issue