diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-04-04 20:37:27 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-04-04 22:04:43 +0200 |
commit | bde8c0e6d9c7d943cf09c8fd4bc3201ab8f4799e (patch) | |
tree | 5d1703e90bec50dec4a01b3a8d2051b1fd043450 | |
parent | 2a58b1b024b645b8f210ffb12f94c9b2fd9ef1e5 (diff) | |
download | guix-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.
-rw-r--r-- | guix/ui.scm | 6 |
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." |