groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Boekhold <boekh...@gmx.com>
Subject Re: Is it possible to implement in the language an `else` block in exception handling?
Date Mon, 28 Sep 2015 07:52:41 GMT
Just put the 'else'  code at the end of the try block!

Maarten


On 28 September 2015 11:15:22 "Edinson E. Padrón Urdaneta" 
<edinson.padron.urdaneta@gmail.com> wrote:

> ​​​​​​Hi, Jochen. Actually, the idea with the else block is to place inside
> it code that would be execute if and only if none exception at all was
> thrown inside its corresponding try block. In other words: the else block
> would be useful for code that must be executed if the try block does not
> throw an exception.
>
> I hope I made me a little more clear this time.
> Cheers.

Mime
View raw message