[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unwind_protect & try/catch combined corner case
From: |
Søren Hauberg |
Subject: |
Re: unwind_protect & try/catch combined corner case |
Date: |
Thu, 07 Jan 2010 14:35:01 +0100 |
tor, 07 01 2010 kl. 14:28 +0100, skrev Jaroslav Hajek:
> > In this case, I will not get an error, right? I think it would be really
> > helpful if I got the error message from 'cd'.
>
> Yes, if you press Ctrl-C while do_stuff is doing stuff, then it will
> silently bring you to the prompt. But of course you will discover the
> problem if you won't interrupt the function.
Doh, I hadn't thought about that. So, the "problem" I saw, just doesn't
matter in real life (it will be easy enough to debug the 'cleanup'
blocks). Then, I don't have any objections.
> > So, I think it might be
> > good if errors raised during interrupt handling could not get caught.
> >
>
> Not that generally, I suppose. You surely want to be able to catch an
> error inside the cleanup block.
> But I understand what you mean. What about the following patch?
I'm not sure you want to "fix" the "problem" I imagined. It really isn't
a problem after all.
Soren
unwind_protect & try/catch combined corner case, John W. Eaton, 2010/01/07