guix-commits
[Top][All Lists]
Advanced

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

branch master updated: ui: Report key-and-arg exceptions correctly.


From: guix-commits
Subject: branch master updated: ui: Report key-and-arg exceptions correctly.
Date: Wed, 05 Aug 2020 16:30:05 -0400

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 05f3d34  ui: Report key-and-arg exceptions correctly.
05f3d34 is described below

commit 05f3d34094b23dc9612ff6641a0257bc4f7dcd12
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Aug 4 21:27:30 2020 +0200

    ui: Report key-and-arg exceptions correctly.
    
    Fixes <https://bugs.gnu.org/42601>.
    Reported by Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>.
    
    Regression introduced in efe037fc5cc3134bbc3ef4e36b49a3f788921b68
    whereby errors like 'wrong-type-arg' would be improperly reported:
    
      guix environment: error: Wrong type argument in position ~A (expecting 
~A): ~S
    
    See also commit a07d5e558b5403dad0a59776b950b6b02169c249.
    
    * guix/ui.scm (call-with-error-handling): Move 'message-condition?'
    clause after '&exception-with-kind-and-args' clause.
---
 guix/ui.scm | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index 42afdc2..efc3f39 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -795,14 +795,6 @@ directories:~{ ~a~}~%")
                      (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 @@ directories:~{ ~a~}~%")
                 (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



reply via email to

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