Hello together,

I have the following problem with scm_misc_error:  In a C loop where I
call a couple of functions I want to catch all occuring errors and then,
when the loop is finished, I want to signal a misc-error and handle it a
list with all errors that have occured so far.

I call it like this:

  scm_misc_error 
    (name,
     "Observers of `~A' have signalled the following errors: ~S",
     scm_cons2 (env, ordered_errors, SCM_UNDEFINED));

Here, name is a `const char*' which describes the C function which
collects all the errors.  For testing purposes, I just call (error)
from two scheme functions that are called during the loop.

The output look like this:

ERROR: In procedure error in expression (error):
ERROR: Observers of `#<leaf environment 37b48>' have signalled the
following errors: (("Observer `~A' signals `~A' error: ~S" #<observer
80240> misc-error (#f "?" #f #f)) ("Observer `~A' signals `~A'
error: ~S" #<observer 802a0> misc-error (#f "?" #f #f)))
ABORT: (misc-error)

It's almost the way I want it to be, except for the fact, that the `name'
parameter is completely ignored by scm_misc_error (or, rather, scm_ithrow
and where that ends).  It seems as if the last error on the scheme level
somehow still influences the generation of the error message.

Best regards
Dirk

Reply via email to