From: Volkan YAZICI <yazicivo@ttnet.net.tr>
Cc: guile-user@gnu.org
Subject: Re: saving and restoring the error stack trace
Date: Thu, 7 Sep 2006 12:02:26 +0300 [thread overview]
Message-ID: <20060907090226.GB1396@alamut> (raw)
In-Reply-To: <87r6z0fqnj.fsf@ossau.uklinux.net>
On Aug 28 11:21, Neil Jerram wrote:
> A common requirement is to be able to show as much useful context as
> possible when a Scheme program hits an error. The most immediate
> information about an error is the kind of error that it is - such as
> "division by zero" - and any parameters that the code which signalled
> the error chose explicitly to provide. This information originates with
> the `error' or `throw' call (or their C code equivalents, if the error
> is detected by C code) that signals the error, and is passed
> automatically to the handler procedure of the innermost applicable
> `catch', `lazy-catch' or `with-throw-handler' expression.
I've another situation that doesn't get executed inside a `catch' block.
For instance, I need to make some variable definitions just before
executing related code via scm_c_with_throw_handler(). The problem is,
in these definitions when an error occurs (e.g. not enough memory in
case of a scm_from_locale_string() call) I'm not able to handle it and
program exists without my permission.
In such a situation, should I try to place my whole definition related
code into a SCM function and execute in a catch scope or is there any
other way to fix this?
[If you want to take a look at the related code, see
place_scheme_args(), guile_eval_str() and handle_scm_res() functions
called inside plscheme_func_handler() function in
http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/~checkout~/plscheme/plscheme/plscheme.c?rev=1.4
URL.]
Regards.
P.S. Thanks for this paper. It's quite helpful. Now I'm planning to
power up my buggy scm_c_with_throw_handler() code with that
make-stack stuff.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2006-09-07 9:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-25 9:39 saving and restoring the error stack trace Marco Maggi
2006-08-27 12:53 ` Neil Jerram
2006-08-28 22:21 ` Neil Jerram
2006-09-07 9:02 ` Volkan YAZICI [this message]
2006-09-07 21:36 ` Neil Jerram
2006-09-08 6:09 ` Volkan YAZICI
-- strict thread matches above, loose matches on Subject: below --
2006-09-01 20:10 Marco Maggi
2006-08-31 6:04 Marco Maggi
2006-09-01 7:47 ` Neil Jerram
2006-09-01 9:39 ` Ludovic Courtès
2006-09-07 22:11 ` Neil Jerram
2006-08-29 3:08 dsmich
2006-09-01 7:34 ` Neil Jerram
2006-08-24 19:34 Marco Maggi
2006-08-24 21:53 ` Neil Jerram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060907090226.GB1396@alamut \
--to=yazicivo@ttnet.net.tr \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).