~ruther/guix-local

bde8c0e6d9c7d943cf09c8fd4bc3201ab8f4799e — Ludovic Courtès 12 years ago 2a58b1b
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.
1 files changed, 3 insertions(+), 3 deletions(-)

M guix/ui.scm
M guix/ui.scm => guix/ui.scm +3 -3
@@ 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."