dev-serveez
[Top][All Lists]
Advanced

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

Re: [dev-serveez] current status


From: Martin Grabmueller
Subject: Re: [dev-serveez] current status
Date: Thu, 07 Jun 2001 20:00:58 +0200

> From: stefan <address@hidden>
> Date: Thu, 7 Jun 2001 19:25:34 +0200 (CEST)
> 
>  * Why is the (current-load-port) undefined in exception and how can 
>    this be fixed ? Since it does not work you will not have any chance
>    finding the source of the exception in the file.

Well, this won't be ``fixed'', because its broken by
design. (current-load-port) returns the current load port while a file
is loaded.  When an error occurs and the corresponding handler is
invoked, the file loading has been aborted and there is no `current
load port' anymore.  There is another possibility to find the source
of an exception, but it is more complicated, so I will hav to
investigate further.  For an example, try running

  guile --debug -s some-buggy-scheme-file.scm

and you will see a backtrace.  Internally, enough information is
available to get at file name and line number information for the
failing expression.  This is already done in CVS Guile, where this
information is printed in backtraces.

>  * Figure out the meaning of the 3 last arguments to gh_new_procedure()
>    and use them as needed. Now they seem to be in arbitrary use.

No, no! They are important!

  SCM gh_new_procedure(const char *proc_name, SCM (*fn)(),
                       int n_required_args, int n_optional_args, int varp);

n_required_args tells Guile how many arguments are _required_ when
calling the procedure, n_optional_args says how many _additional_
arguments are allowed.  varp is 1 if the procedure accepts an
arbitrary number of arguments, it is 0 if no additional arguments
(besides n_required_args+n_optional_args) are allowed.

Regards,
  'martin



reply via email to

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