Re: exception handler
Pete Lomax wrote:
> It should be the *end* of the try block, or some explicit code as in a
> try/catch/end try statement. This makes it much clearer where to put
> code to check what failed, eg:
>
> try
> fail=1
> open(...
> fail=2
> getc(...
> fail=3
> close(...
> catch
> if fail=1 then
> elsif fail=2 then
> end try
>
> Of course if you use three try blocks, you don't need a fail variable.
> If you want it to loop, add a loop around the try block(s).
>
> Pete
> PS The above is structured exception handling, and as I said in my
> other post, Rob should get a simpler final exception handler working
> first.
I see it's structured. I can also see there's no way to go back and
try again if it fails. Suppose the open(... fails.
That would be fail=1, right? So what does the "if fail=1 then" do?
Go back and try again? If so, How?
Irv
|
Not Categorized, Please Help
|
|