guile-user
[Top][All Lists]
Advanced

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

Re: Guile 1.5.4 beta ready for testing.


From: Keith Wright
Subject: Re: Guile 1.5.4 beta ready for testing.
Date: Sat, 20 Oct 2001 16:03:46 -0400

> From: Neil Jerram <address@hidden>
> 
>     Keith> address@hidden guile-1.5.4]$ ./libguile/guile ERROR: no
>     Keith> code for module (readline-activator) address@hidden
> 
> According to the NEWS file, readline-activator hasn't been pertinent
> since Guile 1.3.2.  (Although Mikael made a fix to
> readline-activator.scm in June 2000, which is strange...?)  And
> nothing in Guile itself tries to load this module.
> 
> Do you have a .guile file that refers to (readline-activator)?

I'm not sure, the machine in quesion is five miles away and has
no Net connection, but I think you are right.  In that case the
build process is OK (which is good because I understand it not),
but
  Bug: A bad .guile file kills the whole interpreter with
    a message that does not mention .guile.

I made a patch that "works".  I have not run it through diff and
all that, because I'm lazy and in a hurry and I am not sure I
like the way I did it.  It puts a error catcher in the file
loading code.  Maybe there is a better way, or there should
be a more general way, of appending to a thrown error message
as it flies past you.  Maybe some people want first dibs on
handling errors from files they load.  Maybe it should go
into the epilogue of the dyamic-wind around the call to load,
or be done only while loading .guile.

from libguile/load.c, line 88, right after proc swap_port:

/* if an error is thrown from the file (port) being loaded,
   print a message to current standard error port with
   description of source of problem; re-throw the same error
*/
static SCM print_cur_loadp(void *p, SCM tag, SCM throw_args)
{
  scm_display(scm_makfrom0str("While loading from port "),scm_cur_errp);
  scm_display(scm_cur_loadp,scm_cur_errp);
  scm_newline(scm_cur_errp);
  return scm_ithrow (tag, throw_args, 1);

}

static SCM
load (void *data)
{
  SCM port = SCM_PACK (data);
  while (1)
    {
      SCM form = scm_read (port);
      if (SCM_EOF_OBJECT_P (form))
        break;
      /* added --KW */
      scm_internal_catch (SCM_BOOL_T, 
       (scm_t_catch_body)scm_primitive_eval_x, form, 
        (scm_t_catch_handler) print_cur_loadp, NULL);
      /*rm      scm_primitive_eval_x (form);   -- KW*/
    }
  return SCM_UNSPECIFIED;
}

-- 
     -- Keith Wright  <address@hidden>

Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com>
         ---  Food, Shelter, Source code.  ---



reply via email to

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