Re: exception handler

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Tue, 24 Aug 2004 13:55:15 -0700, Matt Lewis
<guest at RapidEuphoria.com> wrote:

<snip>
>Would the try block apply to exceptions in foo()?
Yes, but without a 'safe point' explicitly defined in foo(), it cannot
possibly resume anywhere in that code; it would resume either
somewhere in bar() or the line following where bar() was invoked.
>  What if foo() had 
>its own try block, and caught the exception, but can't fix it--in other
>words, we have a bad result, and we know that the result of foo() is 
>depended upon later?  Do we need to explicitly throw() an exception up 
>the chain in order for bar() to know that there was an exception?
No, see below.
>What happens to fn?
Nothing.
>Does it stay unassigned--or if previously assigned, does 
>it keep its old value?
Yes. If you need to know that you have just caught and handled an
exception, then of course you just define and set a flag like you
normally would. Also, if you catch an exception in a function, then
that function must/might have to return the "unassigned" value
(#40000000 in posetf, I believe #A0000000 in Euphoria, but I could be
wrong), triggering another (higher level, so it won't loop forever)
exception if that value is ever used.

Actually, I think someone (wolf?) posted some code for this (well the
simpler single final exception handler) involving calling the win32
setFinalExceptionHandler routine with a callback routine?? Did anyone
get something similar working on Linux/dos?

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu