Re: Try Finally...
From: VBDis (vbdis_at_aol.com)
Date: 10/28/04
- Next message: VBDis: "Re: Structured Exception Handling (was: Try Finally...)"
- Previous message: VBDis: "Re: Try Finally..."
- In reply to:(deleted message) L D Blake: "Re: Try Finally..."
- Next in thread: Maarten Wiltink: "Re: Try Finally..."
- Reply: Maarten Wiltink: "Re: Try Finally..."
- Reply: VBDis: "Re: Try Finally..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Oct 2004 07:59:18 GMT
Im Artikel <kegsn0lt1oklojovi15r4ueg3ekatl9v2c@4ax.com>, L D Blake
<not@any.adr> schreibt:
>>You mean one should have two options ?
>>1) Let it roll on (after possibly correcting something)
>>2) Terminate the application
>
>Yep... and that's exactly what I was asking about at the beginning on this
>entire mess...
>
>What should "Finally" do with continuable exceptions?
Ooops, glad to catch this message prior to sending it.
Only after another enlightening contribution I understood why Finally must be
implemented as an exception handler, not as an termination handler. This was a
big misunderstanding till now :-(
But what should Finally do at all, with regards to SEH? IMO it should behave as
is, i.e. return 1 to signal unhandled. Otherwise something like a global
variable would be required, that could be set inside the user code of Finally.
The modified Finally handler then can return this value, AND must reset the
variable to the default state, to prevent wrong signalling when another Finally
block leaves that variable in an unchanged state. The detailed decision about
the value to return is another topic, depending on the access from user code to
the details of the exception.
So the first question IMO is, WHY should Finally have a chance to resume the
application. Only then we need to research how this could be made work. Please
excuse my weak memory, and tell me again why you want Finally to eventually
stop an exception? Wouldn't it be equivalent to:
try ...
except Whatsoever; raise; //non-stopping, as Finally is now
end;
or
try ...
except Repair; //exception cought, resume normal operation
end;
In case somebody missed this:
try Whatever;
except //no code here
end;
simply catches all exceptions and resumes normal operation. Of course
finalization or other repair could be done in the Except code. This is why I
don't understand a need for another way to accomplish such already available
behaviour.
DoDi
- Next message: VBDis: "Re: Structured Exception Handling (was: Try Finally...)"
- Previous message: VBDis: "Re: Try Finally..."
- In reply to:(deleted message) L D Blake: "Re: Try Finally..."
- Next in thread: Maarten Wiltink: "Re: Try Finally..."
- Reply: Maarten Wiltink: "Re: Try Finally..."
- Reply: VBDis: "Re: Try Finally..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|