unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* How can I cause embedded guile interpreter to not call abort() on syntax errors?
@ 2003-08-29 17:20 he11hawk
  2003-08-29 22:55 ` Viktor Pavlenko
  0 siblings, 1 reply; 2+ messages in thread
From: he11hawk @ 2003-08-29 17:20 UTC (permalink / raw)


Hi All.

I'm using guile for scripting inside a long-running task (number crunching).
Unfortunately, if there's an error in the script, libguile calls abort(),
and that kills the entire process, aborting all calculations.  I'd like
instead to get it to behave like the standalone guile does - just display a
message and continue.  I tried to understand how top-repl works in
boot-9.scm, but failed miserably.  Is there an easy way to get this done, or
will I have to adapt top-repl to my needs somehow?

Currently, I simply call scm_c_eval_string with my script.
Thanks.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How can I cause embedded guile interpreter to not call abort() on syntax errors?
  2003-08-29 17:20 How can I cause embedded guile interpreter to not call abort() on syntax errors? he11hawk
@ 2003-08-29 22:55 ` Viktor Pavlenko
  0 siblings, 0 replies; 2+ messages in thread
From: Viktor Pavlenko @ 2003-08-29 22:55 UTC (permalink / raw)
  Cc: guile-user

>>>>> "h" == he11hawk  <he11hawk@hotmail.com> writes:

    h> I'm using guile for scripting inside a long-running task
    h> (number crunching).  Unfortunately, if there's an error in the
    h> script, libguile calls abort(), and that kills the entire
    h> process, aborting all calculations. [...]

Have you looked at scm_internal_catch? Some explanations can be found
in guile source, throw.c. I used it successfully in my libtour project
(see http://freshmeat.net/projects/libtour, scmfunc.cc) for both call
and eval.

HTH

-- 
Viktor


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-29 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-29 17:20 How can I cause embedded guile interpreter to not call abort() on syntax errors? he11hawk
2003-08-29 22:55 ` Viktor Pavlenko

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).