ui: Display hints that come along with '&message' conditions.

* guix/ui.scm (call-with-error-handling): Add case for message and
fix-hint?.
master
Ludovic Courtès 2018-01-07 22:07:53 +01:00
parent b94f250e5a
commit 4a8d536ffe
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 6 additions and 0 deletions

View File

@ -623,6 +623,12 @@ directories:~{ ~a~}~%")
(location->string (error-location c))
(gettext (condition-message c) %gettext-domain))
(exit 1))
((and (message-condition? c) (fix-hint? c))
(format (current-error-port) "~a: error: ~a~%"
(program-name)
(gettext (condition-message c) %gettext-domain))
(display-hint (condition-fix-hint c))
(exit 1))
((message-condition? c)
;; Normally '&message' error conditions have an i18n'd message.
(leave (G_ "~a~%")