unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
Subject: Re: saving and restoring the error stack trace
Date: Thu, 07 Sep 2006 23:11:47 +0100	[thread overview]
Message-ID: <87k64f4998.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87psegudr2.fsf@laas.fr> ( Ludovic Courtès's message of "Fri, 01 Sep 2006 11:39:45 +0200")

ludovic.courtes@laas.fr (Ludovic Courtès) writes:

> Indeed, this exception model is not very convenient.  In some cases,
> it's even hardly usable, as examplified by the `test-suite/lib.scm'
> hacks (use of regexps to parse exception messages and determine their
> meaning...).

IMO this isn't so bad.  Using a regexp to check an exception message
makes sense (i) because the message is part of the interface, and so
worth checking, and (ii) because there will never be a distinct
exception key (or condition type, or whatever) for every possible
exception that can be thrown.

> Ideally, Guile should use some SRFI-3[56]-like mechanism to represent
> exceptions.  Unfortunately, I don't think this could be done without
> breaking compatibility.

Agreed.  I've spent some time thinking about this and haven't found a
solution yet.

> In any case, documenting the exceptions thrown by the built-in
> procedures would certainly help.

Yes, although I prefer a code solution to a documentation one, if that
is possible.

Since people seem to like SRFI-35/36, one option would be to provide a
procedure that would convert a set of throw args into the closest
matching SRFI-35/36 condition.

A developer could choose to use this in their handler procs, and then
use SRFI-35/36 procedures to interrogate the condition further.

If this is possible (which it might not be, because I'm not sure
the SRFIs define enough condition types yet), would it be an adequate
solution?

Regards,
     Neil



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


  reply	other threads:[~2006-09-07 22:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-31  6:04 saving and restoring the error stack trace Marco Maggi
2006-09-01  7:47 ` Neil Jerram
2006-09-01  9:39   ` Ludovic Courtès
2006-09-07 22:11     ` Neil Jerram [this message]
2006-09-12 12:21       ` Exception handling Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2006-09-01 20:10 saving and restoring the error stack trace Marco Maggi
2006-08-29  3:08 dsmich
2006-09-01  7:34 ` Neil Jerram
2006-08-25  9:39 Marco Maggi
2006-08-27 12:53 ` Neil Jerram
2006-08-28 22:21   ` Neil Jerram
2006-09-07  9:02     ` Volkan YAZICI
2006-09-07 21:36       ` Neil Jerram
2006-09-08  6:09         ` Volkan YAZICI
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=87k64f4998.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    /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).