mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
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
1 changed files with 3 additions and 3 deletions
|
@ -194,9 +194,9 @@ (define (call-with-error-handling thunk)
|
|||
;; 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."
|
||||
|
|
Loading…
Reference in a new issue