summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-02-21 17:45:04 +0100
committerLudovic Courtès <ludo@gnu.org>2014-02-21 23:49:52 +0100
commitc1d52c71aa4fc8085a9737ad1b235ca53a854649 (patch)
tree7c328aea8f93a0d44e2c3cc76afbf00f8ed1b592
parenta93e91ff484005e05491621664ab71f888ad2ba2 (diff)
downloadpatches-c1d52c71aa4fc8085a9737ad1b235ca53a854649.tar
patches-c1d52c71aa4fc8085a9737ad1b235ca53a854649.tar.gz
ui: Handle SRFI-35 '&message' conditions.
* guix/ui.scm (call-with-error-handling): Add case for 'message-condition?'. * po/Makevars: Fix typo in comment.
-rw-r--r--guix/ui.scm6
-rw-r--r--po/Makevars2
2 files changed, 6 insertions, 2 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index d6058f806b..c232b32674 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -31,6 +31,7 @@
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35)
#:use-module (srfi srfi-37)
#:autoload (ice-9 ftw) (scandir)
#:use-module (ice-9 match)
@@ -186,7 +187,10 @@ General help using GNU software: <http://www.gnu.org/gethelp/>"))
((nix-protocol-error? c)
;; FIXME: Server-provided error messages aren't i18n'd.
(leave (_ "build failed: ~a~%")
- (nix-protocol-error-message c))))
+ (nix-protocol-error-message c)))
+ ((message-condition? c)
+ ;; Normally '&message' error conditions have an i18n'd message.
+ (leave (_ "~a~%") (gettext (condition-message c)))))
;; Catch EPIPE and the likes.
(catch 'system-error
thunk
diff --git a/po/Makevars b/po/Makevars
index ade615a452..d45ea4b979 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -6,7 +6,7 @@ subdir = po
top_builddir = ..
# These options get passed to xgettext. We want to catch standard
-# gettext uses, package synopses and descriptions, and SRFI-34 error
+# gettext uses, package synopses and descriptions, and SRFI-35 error
# condition messages.
XGETTEXT_OPTIONS = \
--language=Scheme --from-code=UTF-8 \