[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] catching exceptions
From: |
F. Wittenberger |
Subject: |
Re: [Chicken-users] catching exceptions |
Date: |
Tue, 29 Jul 2008 10:30:17 +0200 |
Hi all,
continuing my experiments to catch exceptions in chicken, I've been
working out a more core-chicken-only example.
> > > Let's see. Is this correct as a minimal example?
> > > --- %< tg.scm ----
> > > (require-extension srfi-34)
> > > (print (guard (ex (else 'success)) (call-with-input-string ")" read)))
> > > --- %< ----
> >
> > no, for two reasons:
> > first, you need to (require-extension ports) for call-with-input-string.
Now I tried:
--- %< tg.scm ----
(require-extension ports)
(print (condition-case
(call-with-input-string ")" read)
(var () 'condition-case-does-a-better-job-than-guard)))
--- %< ----
And here the result:
$ csc -o tg tg.scm
$ ./tg
Error: unexpected list terminator: #\)
Call history:
##sys#require
call-with-current-continuation
with-exception-handler
##sys#call-with-values
call-with-input-string <--
Looks as if condition-case is - too - unable to catch the exception.
Did I still do anything wrong?
best regards
/Jörg
- [Chicken-users] catching exceptions, F. Wittenberger, 2008/07/24
- Re: [Chicken-users] catching exceptions, Elf, 2008/07/24
- Message not available
- Message not available
- Message not available
- Message not available
- Re: [Chicken-users] catching exceptions, F. Wittenberger, 2008/07/27
- Re: [Chicken-users] catching exceptions, felix winkelmann, 2008/07/28
- Re: [Chicken-users] catching exceptions,
F. Wittenberger <=
- Re: [Chicken-users] catching exceptions, Ivan Raikov, 2008/07/29
- Re: [Chicken-users] catching exceptions, F. Wittenberger, 2008/07/29
- Re: [Chicken-users] catching exceptions, Ivan Raikov, 2008/07/29
- Re: [Chicken-users] catching exceptions, Elf, 2008/07/29
- Re: [Chicken-users] catching exceptions, F. Wittenberger, 2008/07/29
- Re: [Chicken-users] catching exceptions, Elf, 2008/07/29
- Re: [Chicken-users] catching exceptions, F. Wittenberger, 2008/07/29
- Re: [Chicken-users] catching exceptions, Elf, 2008/07/29
- Re: [Chicken-users] catching exceptions, F. Wittenberger, 2008/07/29
- Re: [Chicken-users] catching exceptions, Elf, 2008/07/29