chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Fix bad call in chicken-install error situ


From: Mario Domenech Goulart
Subject: Re: [Chicken-hackers] [PATCH] Fix bad call in chicken-install error situation
Date: Mon, 16 Jul 2012 14:44:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

Hi,

On Thu, 12 Jul 2012 20:46:47 +0200 Peter Bex <address@hidden> wrote:

> I had some networking trouble just now and noticed that chicken-install
> showed the following output, which is obviously incorrect:
>
> TCP connect timeout
>
> Error: bad argument count - received 2 but expected 3: #<procedure>
>
> A similar situation can easily be triggered by calling chicken-install
> with a nonexistent hostname:
>
> $ chicken-install -l foo bar
> retrieving ...
> connecting to host "foo", port 80 ...
> TCP connect timeout
>
> Error: bad argument count - received 2 but expected 3: #<procedure>
>
> The attached patch fixes the immediate error by calling "proc" with
> three arguments instead of two.  However, I'm still a little unsure
> how this is supposed to work.  For example, in
> list-available-extensions, if "trans" is false, it will invoke the
> NEXT procedure, which is #f.  I've tried but was unable to trigger
> an error situation, so I suppose it's okay the way it is (but I still
> don't understand).

Shouldn't `with-default-sources' give something like

      (lambda ()
        (with-output-to-port (current-error-port)
          (lambda ()
            (print "Could not determine a source of extensions. "
                   "Please, specify a location and a transport for a source.")))
        (exit 1))

as the third argument to proc?  Or maybe it could simply abort instead
of calling proc.

Also, maybe `list-available-extensions' should test against `(and trans
locn)' since the procedures wrapped by `list-extensions' would error out
if given a location as #f.

Best wishes.
Mario
-- 
http://parenteses.org/mario



reply via email to

[Prev in Thread] Current Thread [Next in Thread]