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.
This commit is contained in:
Ludovic Courtès 2014-04-04 20:37:27 +02:00
parent 2a58b1b024
commit bde8c0e6d9
1 changed files with 3 additions and 3 deletions

View File

@ -194,9 +194,9 @@ General help using GNU software: <http://www.gnu.org/gethelp/>"))
;; Catch EPIPE and the likes. ;; Catch EPIPE and the likes.
(catch 'system-error (catch 'system-error
thunk thunk
(lambda args (lambda (key proc format-string format-args . rest)
(leave (_ "~a~%") (leave (_ "~a: ~a~%") proc
(strerror (system-error-errno args))))))) (apply format #f format-string format-args))))))
(define (read/eval str) (define (read/eval str)
"Read and evaluate STR, raising an error if something goes wrong." "Read and evaluate STR, raising an error if something goes wrong."