git: Add an exception printer for 'git-error'.
* guix/git.scm (print-git-error): New procedure. <top level>: Call 'set-exception-printer!'.
This commit is contained in:
parent
70a50305c4
commit
1d8b10d00f
|
@ -300,6 +300,14 @@ Log progress and checkout info to LOG-PORT."
|
|||
#:select? (negate dot-git?))
|
||||
commit)))
|
||||
|
||||
(define (print-git-error port key args default-printer)
|
||||
(match args
|
||||
(((? git-error? error) . _)
|
||||
(format port (G_ "Git error: ~a~%")
|
||||
(git-error-message error)))))
|
||||
|
||||
(set-exception-printer! 'git-error print-git-error)
|
||||
|
||||
|
||||
;;;
|
||||
;;; Checkouts.
|
||||
|
|
Loading…
Reference in New Issue