From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyprien Nicolas Subject: Re: dmd: [PATCH] Improve socket connection errors handling. Date: Thu, 10 Apr 2014 17:16:18 +0200 Message-ID: <20140410151618.GI9248@kubera.prv.maison> References: <20140410081446.GF9248@kubera.prv.maison> <87k3ax6xu4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PpAOPzA3dXsRhoo+" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYGiM-0003aV-Ha for guix-devel@gnu.org; Thu, 10 Apr 2014 11:16:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYGiG-0007wq-2w for guix-devel@gnu.org; Thu, 10 Apr 2014 11:16:30 -0400 Content-Disposition: inline In-Reply-To: <87k3ax6xu4.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --PpAOPzA3dXsRhoo+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Il y a environ 24 minutes, Ludovic Court=C3=A8s =C3=A9crivit=C2=A0: > I pushed a couple of patches that achieve the same result slightly > differently: =E2=80=98open-connection=E2=80=99 is left unchanged and it= =E2=80=99s the caller=E2=80=99s > responsibility to handle any errors; clients use the new > =E2=80=98with-system-error-handling=E2=80=99 macro do handle all =E2=80= =98system-error=E2=80=99 > exceptions gracefully. Right, much better and elegant fix :-) > One remark: > > > + (lambda (key . args) > > + (display (format #f "Error: Cannot connect to socket `~a': ~= a\n" > > + file (apply format #f (cadr args) (caddr ar= gs))) > > + (current-error-port)) > > This could be directly (format (current-error-port) ...). I missed that part of the documentation. Thanks for pointing that out. > Also, we avoid uses of =E2=80=98car=E2=80=99, =E2=80=98cadr=E2=80=99 etc.= in favor of =E2=80=98match=E2=80=99 (at least > in new code.) Noted, thanks. --=20 Cyprien/Fulax --PpAOPzA3dXsRhoo+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAEBAgAGBQJTRrXCAAoJEGeOLLwllM0zKhoH/3MYC3XKKEkB6bcLijBrBhqy vAKXCZr/b3uJ2vLyHnWRrnwv7pniyiMqMJCpktQ3Wo7zRRUy77f8jORSGmpHszd+ Dni1OHC2GCs2fagc53ghroURmS0I77OguuoHqg7bv3Xb2Q6UGR126UM8Pqi2VtSU IaQ3lb+bqxQQ/wcMS/W3kCk22O5Kcjt80tzoHua2jvv/qU2gq9qmVGjkg2g2lUbh qofUuwYL1+Qr5gMY8wqQ7Vw+5oYuHbGW5+8v1NiR1xCFyWDH51nn2SR9tlGpxJ89 q+nwNRZFQ7CrB8O33DM1tXdTXMVaVSJyUkQFzEwTmxw2Meb9Z1j2rPw1JmcI+ww= =nEaB -----END PGP SIGNATURE----- --PpAOPzA3dXsRhoo+--