guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Ludovic Courtès
Subject: 01/07: ui: Display hints that come along with '&message' conditions.
Date: Sun, 7 Jan 2018 17:57:18 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 4a8d536ffe4cac1822d9655e0871fdc1684d569b
Author: Ludovic Courtès <address@hidden>
Date:   Sun Jan 7 22:07:53 2018 +0100

    ui: Display hints that come along with '&message' conditions.
    
    * guix/ui.scm (call-with-error-handling): Add case for message and
    fix-hint?.
---
 guix/ui.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/guix/ui.scm b/guix/ui.scm
index 6e08a61..8951797 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -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~%")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]