diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-08 06:29:52 +0100 |
---|---|---|
committer | jade <lix@jade.fyi> | 2024-03-09 03:37:35 -0700 |
commit | 379681157172658825e4b647eec9477dd5d8f05d (patch) | |
tree | 6e59202732764e6675c4601dc962f716057dfcb2 /src/libexpr/print.cc | |
parent | b6b31d255a32c98ce2df4d807601d9ee8a33f7ef (diff) |
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
Diffstat (limited to 'src/libexpr/print.cc')
-rw-r--r-- | src/libexpr/print.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/print.cc b/src/libexpr/print.cc index c04278a0e..8b45475d8 100644 --- a/src/libexpr/print.cc +++ b/src/libexpr/print.cc @@ -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; } |