* gethost error display
@ 2003-02-14 21:38 Kevin Ryde
2004-06-22 15:51 ` Rob Browning
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Ryde @ 2003-02-14 21:38 UTC (permalink / raw)
In guile 1.6.3 built on a recent i386 debian, running interactively
and trying to find a non-existant host with
(gethost "x")
produces
standard input:1:1: In procedure gethost in expression (gethost "x"):
standard input:1:1: Unknown host
Exception during displaying of error: misc-error
ABORT: (host-not-found)
I take it "Exception during displaying of error" means what it says.
Nosing around the source it seems the error is thrown with string
"Host name lookup failure" but with an extra argument (the bad host
name), and simple-format objects to that extra.
I don't know if the gethost error should be changed, it might break
existing code to do so.
But it might be nice if the default error handler was more forgiving
of exception arguments. If the arguments are pretty much arbitrary
then perhaps some sort of heuristic like using simple-format only if
there's the right number of ~A or ~S in the string.
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gethost error display
2003-02-14 21:38 gethost error display Kevin Ryde
@ 2004-06-22 15:51 ` Rob Browning
2004-07-01 0:40 ` Kevin Ryde
0 siblings, 1 reply; 4+ messages in thread
From: Rob Browning @ 2004-06-22 15:51 UTC (permalink / raw)
Cc: bug-guile
Kevin Ryde <user42@zip.com.au> writes:
> I don't know if the gethost error should be changed, it might break
> existing code to do so.
>
> But it might be nice if the default error handler was more forgiving
> of exception arguments. If the arguments are pretty much arbitrary
> then perhaps some sort of heuristic like using simple-format only if
> there's the right number of ~A or ~S in the string.
Actually, I wonder if this is just a bug. The scm_error call in
scm_resolv_error passes the bad host name as a format argument, but
none of the error messages have format escapes. So I suspect maybe
this call:
scm_error (key, subr, errmsg, scm_cons (bad_value, SCM_EOL), SCM_EOL);
should actually look like this:
scm_error (key, subr, errmsg, SCM_BOOL_F, scm_list_1 (bad_value));
so that we pass the bad hostname as one of the exception extra data
items rather than making it the first format string item.
Anyone have any counterarguments?
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gethost error display
2004-06-22 15:51 ` Rob Browning
@ 2004-07-01 0:40 ` Kevin Ryde
2004-08-12 1:05 ` Rob Browning
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Ryde @ 2004-07-01 0:40 UTC (permalink / raw)
Cc: bug-guile
Rob Browning <rlb@defaultvalue.org> writes:
>
> The scm_error call in
> scm_resolv_error passes the bad host name as a format argument, but
> none of the error messages have format escapes.
Yep, they're just the hstrerror strings.
> so that we pass the bad hostname as one of the exception extra data
> items rather than making it the first format string item.
Or alternately, perhaps just quietly drop it. Other system errors
don't include the offending filename or whatever in the throw.
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gethost error display
2004-07-01 0:40 ` Kevin Ryde
@ 2004-08-12 1:05 ` Rob Browning
0 siblings, 0 replies; 4+ messages in thread
From: Rob Browning @ 2004-08-12 1:05 UTC (permalink / raw)
Cc: bug-guile
Kevin Ryde <user42@zip.com.au> writes:
>> so that we pass the bad hostname as one of the exception extra data
>> items rather than making it the first format string item.
>
> Or alternately, perhaps just quietly drop it. Other system errors
> don't include the offending filename or whatever in the throw.
Just to follow up, that's what I did.
Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-12 1:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-14 21:38 gethost error display Kevin Ryde
2004-06-22 15:51 ` Rob Browning
2004-07-01 0:40 ` Kevin Ryde
2004-08-12 1:05 ` Rob Browning
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).