Enrico,
I said:
<<<
To be more specific, my understanding is that the Catcher in Java/C#/C
++/VB etc., does NOT allow you to CONTINUE execution,
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
↓↓↓↓↓↓↓↓↓
from the same point where the error was raised,
nor replace the expression
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
↑↑↑↑↑↑↑↑↑
producing the error with some value, so that execution can continue
as if the exception was NOT raised.
>>>
But it seems you completely ignored the now emphasized portion. as
well as my sample:
//----------------------------------------------------------------------
-----------//
#include "error.ch"
PROCEDURE Main()
LOCAL x := {}, e
TRY
#if 0// Change to 1 to see explicit catcher work!
x[1] := 0
#else
x := x / 0
#endif
//
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
↓↓↓↓↓↓↓↓↓↓↓↓↓
? "Will never get here, in Java nor xHarbour"
? "even if execption does not have any explicit catcher!"
//
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
↑↑↑↑↑↑↑↑↑↑↑↑↑
CATCH e
SWITCH e:genCode
CASE EG_BOUND
CASE EG_NUMERR
? e:Description
EXIT
DEFAULT
Throw( e )
END SWITCH
END TRY
RETURN
//----------------------------------------------------------------------
-----------//
Again, it seems you completely missed the now emphasized lines.
FWIW, xHarbour TRY/CATCh works exactly as per your sample.
Ron
On Jun 27, 2008, at 9:02 AM, Enrico Maria Giordano wrote:
>
> -----Messaggio Originale-----
> Da: "Ron Pinkas" <[EMAIL PROTECTED]>
> A: "Enrico Maria Giordano" <[EMAIL PROTECTED]>
> Cc: "Eduardo Fernandes" <[EMAIL PROTECTED]>; "Maurilio Longo"
> <[EMAIL PROTECTED]>; "Xharbour-Developers List"
> <[email protected]>
> Data invio: venerdì 27 giugno 2008 15.42
> Oggetto: Re: [xHarbour-developers] Enc: Res: Next Release (RC2)
>
>
>> Enrico,
>>
>> Execution continues *AFETR* the *END* of ALL caught exceptions,
>> in all
>> languages I know, including xHarbour. This is was NOT what I was
>> talking
>> about. Please re-read my posts.
>
> Sorry, I don't understand.
>
> EMG
>
> --
> EMAG Software Homepage: http://www.emagsoftware.it
> The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
> The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
> The EMG Music page: http://www.emagsoftware.it/emgmusic
>
>
> ----------------------------------------------------------------------
> ---
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> xHarbour-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers