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
1 changed files with 3 additions and 3 deletions
|
@ -253,7 +253,7 @@ private:
|
|||
output << "»";
|
||||
if (options.ansiColors)
|
||||
output << ANSI_NORMAL;
|
||||
} catch (BaseError & e) {
|
||||
} catch (Error & e) {
|
||||
printError_(e);
|
||||
}
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ private:
|
|||
output << ANSI_NORMAL;
|
||||
}
|
||||
|
||||
void printError_(BaseError & e)
|
||||
void printError_(Error & e)
|
||||
{
|
||||
if (options.ansiColors)
|
||||
output << ANSI_RED;
|
||||
|
@ -420,7 +420,7 @@ private:
|
|||
if (options.force) {
|
||||
try {
|
||||
state.forceValue(v, v.determinePos(noPos));
|
||||
} catch (BaseError & e) {
|
||||
} catch (Error & e) {
|
||||
printError_(e);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue