[Gambas-user] Behaviour FINALLY CATCH

PICCORO McKAY Lenz mckaygerhard at gmail.com
Sun Apr 1 19:08:00 CEST 2018


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180401/41ef1e68/attachment-0001.html>


More information about the User mailing list