[Gambas-user] using try when access devices shadow the errors

PICCORO McKAY Lenz mckaygerhard at gmail.com
Thu Aug 2 16:57:18 CEST 2018


2018-08-02 10:32 GMT-04:00 T Lee Davidson <t.lee.davidson at gmail.com>:

> There is no such thing as a "try-catch" in Gambas. CATCH is *not* used
> with TRY.
> Tobi gave a good example:
>
i see it and that's why i point "there's no such information on the wiki"


> Yes! CATCH is *not* used with TRY. TRY does not open an exception handling
> block as with other languages (eg. Python's
> "try-except"). It is a statement that affects the behavior of only the
> *line* which it begins.
>
> When using TRY, you test for an error condition with the ERROR keyword. If
> you do not, then the error is not revealed, and the
> program would continue merrily along under a potentially false assumption.
> If you want to use CATCH, then do not use TRY.
>
well i comming from java and C and its common ofr us use try/cacht as duple

anyway! there's not similar info in the wiki that produces a waste of time
for novices !


>
>
> ___
> Lee
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180802/81d66e24/attachment.html>


More information about the User mailing list