diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-02-11 22:51:08 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-02-11 23:23:28 +0100 |
commit | 1d8b10d00f0c242bc5ce9540737af3d3f24a05c0 (patch) | |
tree | 8230af15ec29e374687a274928a3978a2a8ab941 | |
parent | 70a50305c495ca96fdec3d31e7e7972cfc54f8ee (diff) | |
download | patches-1d8b10d00f0c242bc5ce9540737af3d3f24a05c0.tar patches-1d8b10d00f0c242bc5ce9540737af3d3f24a05c0.tar.gz |
git: Add an exception printer for 'git-error'.
* guix/git.scm (print-git-error): New procedure.
<top level>: Call 'set-exception-printer!'.
-rw-r--r-- | guix/git.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/git.scm b/guix/git.scm index 0e3ce37e26..289537dedf 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -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. |