[Top][All Lists]

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

Re: I'm missing something obvious about (chicken conditions)

From: T. Kurt Bond
Subject: Re: I'm missing something obvious about (chicken conditions)
Date: Wed, 8 Mar 2023 08:34:30 -0500

Ahh!  Thank you!

On Wed, Mar 8, 2023 at 2:35 AM Peter Bex <> wrote:
On Tue, Mar 07, 2023 at 04:40:15PM -0500, T. Kurt Bond wrote:
> I've got two programs, edited down from other slightly larger programs
> for clarity.  They use condition-case to handle exceptions.  I'm
> interested in handling a (mine) condition and a (mine too)
> differently.  One of the program *does* distinguish between the two
> exceptions; one of them doesn't.  I can't figure out why.

Yeah, took me a while to spot the difference as well.  Let me highlight
the relevant lines:

> (define mine-two (condition '(mine) '(two)))
>   (condition-case (thunk)
>     [ex (mine too)
>         (format #t "This is a (mine too) condition: ~s~%" ex)]
> (check (lambda () (signal mine-two)))
> (check (lambda () (signal (condition '(mine) '(two)))))

Note that in the condition-case you have "mine too", while here it's
"mine two".  One letter difference :)


T. Kurt Bond,,

reply via email to

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