mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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
1 changed files with 8 additions and 0 deletions
|
@ -300,6 +300,14 @@ (define (dot-git? file stat)
|
|||
#: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 a new issue