From bde8c0e6d9c7d943cf09c8fd4bc3201ab8f4799e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 4 Apr 2014 20:37:27 +0200 Subject: 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. --- guix/ui.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guix/ui.scm') 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: ")) ;; 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." -- cgit v1.2.3