unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Hans Aberg <haberg@math.su.se>
Cc: guile-user@gnu.org
Subject: Re: Catching
Date: Mon, 22 Feb 2010 14:22:42 +0100	[thread overview]
Message-ID: <87vddp1k2l.fsf@gnu.org> (raw)
In-Reply-To: <C94CA0BC-55E1-4EF3-B939-677768EB1630@math.su.se> (Hans Aberg's message of "Mon, 22 Feb 2010 12:09:00 +0100")

Hi,

Hans Aberg <haberg@math.su.se> writes:

> I seem to not get the catch handler called, when using guile
> interactively. Might you provide a small example? Something like:
> (catch 'FOO (throw 'FOO "Test") (lambda (x . xt) (display x) (display
> " . ") (display xt)))

The second argument of ‘catch’ should be a thunk (a zero-argument
procedure):

  (catch 'FOO
    (lambda ()
      (throw 'FOO "test"))
    (lambda (key . args)
      (display args)))

Thanks,
Ludo’.




  reply	other threads:[~2010-02-22 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 11:09 Catching Hans Aberg
2010-02-22 13:22 ` Ludovic Courtès [this message]
2010-02-22 13:50   ` Catching Hans Aberg

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=87vddp1k2l.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=haberg@math.su.se \
    /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).