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:
parent
2a58b1b024
commit
bde8c0e6d9
|
@ -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."
|
||||||
|
|
Loading…
Reference in New Issue