ui: Report key-and-arg exceptions correctly.
Fixes <https://bugs.gnu.org/42601>. Reported by Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>. Regression introduced inefe037fc5c
whereby errors like 'wrong-type-arg' would be improperly reported: guix environment: error: Wrong type argument in position ~A (expecting ~A): ~S See also commita07d5e558b
. * guix/ui.scm (call-with-error-handling): Move 'message-condition?' clause after '&exception-with-kind-and-args' clause.
This commit is contained in:
parent
fc45f2fcf8
commit
05f3d34094
1 changed files with 10 additions and 9 deletions
19
guix/ui.scm
19
guix/ui.scm
|
@ -795,14 +795,6 @@ (define (manifest-entry-output* entry)
|
|||
(invoke-error-stop-signal c)
|
||||
(cons (invoke-error-program c)
|
||||
(invoke-error-arguments c))))
|
||||
((message-condition? c)
|
||||
;; Normally '&message' error conditions have an i18n'd message.
|
||||
(report-error (and (error-location? c) (error-location c))
|
||||
(G_ "~a~%")
|
||||
(gettext (condition-message c) %gettext-domain))
|
||||
(when (fix-hint? c)
|
||||
(display-hint (condition-fix-hint c)))
|
||||
(exit 1))
|
||||
|
||||
((formatted-message? c)
|
||||
(apply report-error
|
||||
|
@ -825,7 +817,16 @@ (define (manifest-entry-output* entry)
|
|||
(guile-3
|
||||
((exception-predicate &exception-with-kind-and-args) c))
|
||||
(else #f))
|
||||
(raise c)))
|
||||
(raise c))
|
||||
|
||||
((message-condition? c)
|
||||
;; Normally '&message' error conditions have an i18n'd message.
|
||||
(report-error (and (error-location? c) (error-location c))
|
||||
(G_ "~a~%")
|
||||
(gettext (condition-message c) %gettext-domain))
|
||||
(when (fix-hint? c)
|
||||
(display-hint (condition-fix-hint c)))
|
||||
(exit 1)))
|
||||
;; Catch EPIPE and the likes.
|
||||
(catch 'system-error
|
||||
thunk
|
||||
|
|
Loading…
Reference in a new issue