lint: Gracefully handle errors from 'connect' & co.
* guix/lint.scm (call-with-networking-fail-safe): Add case for 'system-error' as typically raised by 'connect' & co.
This commit is contained in:
parent
2c0040ae30
commit
900e0fbcc4
|
@ -950,6 +950,16 @@ display a message including MESSAGE and return ERROR-VALUE."
|
||||||
message
|
message
|
||||||
(tls-certificate-error-string args))
|
(tls-certificate-error-string args))
|
||||||
error-value)
|
error-value)
|
||||||
|
((and ('system-error _ ...) args)
|
||||||
|
(let ((errno (system-error-errno args)))
|
||||||
|
(if (member errno (list ECONNRESET ECONNABORTED ECONNREFUSED))
|
||||||
|
(let ((details (call-with-output-string
|
||||||
|
(lambda (port)
|
||||||
|
(print-exception port #f (car args)
|
||||||
|
(cdr args))))))
|
||||||
|
(warning (G_ "~a: ~a~%") message details)
|
||||||
|
error-value)
|
||||||
|
(apply throw args))))
|
||||||
(args
|
(args
|
||||||
(apply throw args))))))
|
(apply throw args))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue