On Mon 18 Jul 2011 14:59, [email protected] (Ludovic Courtès) writes:
> Andy Wingo <[email protected]> skribis:
>
>> (define (open-socket-for-uri uri)
>> (let* ((ai (car (getaddrinfo (uri-host uri)
>
> What if URI is file://foo?
It will look up the addrinfo for the "file" service of "foo".
scheme@(guile-user)> (getaddrinfo "foo" "file")
ERROR: In procedure getaddrinfo:
ERROR: Throw to key `getaddrinfo-error' with args `(-8)'.
If you use file:///foo:
scheme@(guile-user)> (getaddrinfo #f "file")
ERROR: In procedure getaddrinfo:
ERROR: Throw to key `getaddrinfo-error' with args `(-8)'.
I guess we need to add exception printers for these errors. Want to do
that? :-)
Andy
--
http://wingolog.org/