summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-04-04 20:37:27 +0200
committerLudovic Courtès <ludo@gnu.org>2014-04-04 22:04:43 +0200
commitbde8c0e6d9c7d943cf09c8fd4bc3201ab8f4799e (patch)
tree5d1703e90bec50dec4a01b3a8d2051b1fd043450 /guix
parent2a58b1b024b645b8f210ffb12f94c9b2fd9ef1e5 (diff)
downloadguix-patches-bde8c0e6d9c7d943cf09c8fd4bc3201ab8f4799e.tar
guix-patches-bde8c0e6d9c7d943cf09c8fd4bc3201ab8f4799e.tar.gz
ui: Improve reporting of 'system-error' exceptions.
* guix/ui.scm (call-with-error-handling): Change 'system-error' handler to display the error message as it was raised.
Diffstat (limited to 'guix')
-rw-r--r--guix/ui.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index c232b32674..dcad55e72e 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -194,9 +194,9 @@ General help using GNU software: <http://www.gnu.org/gethelp/>"))
;; Catch EPIPE and the likes.
(catch 'system-error
thunk
- (lambda args
- (leave (_ "~a~%")
- (strerror (system-error-errno args)))))))
+ (lambda (key proc format-string format-args . rest)
+ (leave (_ "~a: ~a~%") proc
+ (apply format #f format-string format-args))))))
(define (read/eval str)
"Read and evaluate STR, raising an error if something goes wrong."