Merge pull request #9927 from 9999years/catch-error-in-value-printer

Catch `Error`, not `BaseError` in `ValuePrinter`
This commit is contained in:
Eelco Dolstra 2024-02-05 15:01:21 +01:00 committed by GitHub
commit c291d2d8dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,7 @@ private:
output << "»";
if (options.ansiColors)
output << ANSI_NORMAL;
} catch (BaseError & e) {
} catch (Error & e) {
printError_(e);
}
}
@ -405,7 +405,7 @@ private:
output << ANSI_NORMAL;
}
void printError_(BaseError & e)
void printError_(Error & e)
{
if (options.ansiColors)
output << ANSI_RED;
@ -422,7 +422,7 @@ private:
if (options.force) {
try {
state.forceValue(v, v.determinePos(noPos));
} catch (BaseError & e) {
} catch (Error & e) {
printError_(e);
return;
}