[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: lint: 'with-networking-fail-safe' handles 'gnutls-error' exceptio
From: |
guix-commits |
Subject: |
01/03: lint: 'with-networking-fail-safe' handles 'gnutls-error' exceptions. |
Date: |
Thu, 24 Jun 2021 17:43:28 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 468a5f8676c82e17de98d12077c671823177d944
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Jun 24 13:57:54 2021 +0200
lint: 'with-networking-fail-safe' handles 'gnutls-error' exceptions.
* guix/lint.scm (call-with-networking-fail-safe): Add clause for
'gnutls-error'.
---
guix/lint.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/guix/lint.scm b/guix/lint.scm
index d65d5ce..36a672c 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -68,6 +68,7 @@
. guix:open-connection-for-uri)))
#:use-module (web request)
#:use-module (web response)
+ #:autoload (gnutls) (error->string)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-6) ;Unicode string ports
#:use-module (srfi srfi-9)
@@ -1162,6 +1163,11 @@ display a message including MESSAGE and return
ERROR-VALUE."
message
(tls-certificate-error-string args))
error-value)
+ (('gnutls-error error function _ ...)
+ (warning (G_ "~a: TLS error in '~a': ~a~%")
+ message
+ function (error->string error))
+ error-value)
((and ('system-error _ ...) args)
(let ((errno (system-error-errno args)))
(if (member errno (list ECONNRESET ECONNABORTED ECONNREFUSED))