[Gambas-user] Behaviour FINALLY CATCH

PICCORO McKAY Lenz mckaygerhard at gmail.com
Sun Apr 1 19:20:44 CEST 2018


well same error with different behaviour, in my gambas happened as i said

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2018-04-01 13:18 GMT-04:00 Michael Altrogge <mnaltrogge at web.de>:

>
> No, the error is <Division by zero> ... and is only raised if the FINALLY
> part is empty ...
>
>
> *Gesendet:* Sonntag, 01. April 2018 um 19:08 Uhr
> *Von:* "PICCORO McKAY Lenz" <mckaygerhard at gmail.com>
> *An:* "Gambas Mailing List" <user at lists.gambas-basic.org>
> *Betreff:* Re: [Gambas-user] Behaviour FINALLY CATCH
> benoit, its a bug, if a new line with a comment are in the finally, a bug
> will raised
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
>
> 2018-04-01 12:41 GMT-04:00 Benoît Minisini <g4mba5 at gmail.com>:
>>
>> Le 01/04/2018 à 18:32, Michael N. Altrogge a écrit :
>>>
>>> I have a problem while using Finally / Catch ...
>>>
>>> The finally part is ONLY executed if empty, even the entry is a comment.
>>>
>>>
>>> This will NOT work:
>>>
>>> /Public Function fncCheckDigit() As Integer
>>>
>>>      ...
>>>
>>>      intZahl= intWert1 / 0
>>>
>>>      ...
>>>
>>> Finally                     ' Aufräumen nach Fehler
>>>      'Blah blah blubb
>>>
>>> Catch                       ' Fehlerbahndlung
>>>      For Each strError In Error.Backtrace
>>>          Debug strError & gb.NewLine
>>>      Next
>>>
>>> End
>>> /
>>> This will work:
>>>
>>> /Public Function fncCheckDigit() As Integer
>>>
>>>      ...
>>>
>>>      intZahl= intWert1 / 0
>>>
>>>      ...
>>>
>>> Finally                     ' Aufräumen nach Fehler
>>>
>>> Catch                       ' Fehlerbahndlung
>>>      For Each strError In Error.Backtrace
>>>          Debug strError & gb.NewLine
>>>      Next
>>>
>>> End
>>> //
>>> /Is this the expected behaviour?
>>> /
>>>
>>
>>
>> Sorry, I don't understand what you mean. If the FINALLY part is void,
>> what do you expect him to do?
>>
>> --
>> Benoît Minisini
>>
>> --------------------------------------------------
>>
>> This is the Gambas Mailing List:
>> https://lists.gambas-basic.org/listinfo/user
>>
>> Search the list:
>> https://lists.gambas-basic.org/cgi-bin/search.cgi
>>
>> Hosted by https://www.hostsharing.net
>
> -------------------------------------------------- This is the Gambas
> Mailing List: https://lists.gambas-basic.org/listinfo/user Search the
> list: https://lists.gambas-basic.org/cgi-bin/search.cgi Hosted by
> https://www.hostsharing.net
>
>
> --------------------------------------------------
>
> This is the Gambas Mailing List:
> https://lists.gambas-basic.org/listinfo/user
>
> Search the list:
> https://lists.gambas-basic.org/cgi-bin/search.cgi
>
> Hosted by https://www.hostsharing.net
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180401/1c0d74b3/attachment.html>


More information about the User mailing list