forked from lix-project/lix
Merge pull request #9927 from 9999years/catch-error-in-value-printer
Catch `Error`, not `BaseError` in `ValuePrinter`
BaseError includes Interrupt. We probably don't want the value printer to tell you Ctrl-C was pressed while it was printing.
(cherry picked from commit c291d2d8dda38aa88b004e2ed05b28653c07e342)
Change-Id: I70b105bfb2f52a8f345ae0281d12f022aa36b14e
This commit is contained in:
parent
b6b31d255a
commit
3796811571
|
@ -253,7 +253,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -403,7 +403,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;
|
||||||
|
@ -420,7 +420,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