[Gambas-user] "If Error" is ambiguous

Benoît Minisini g4mba5 at gmail.com
Mon Sep 9 23:59:31 CEST 2019


Le 09/09/2019 à 23:01, Christof Thalhofer a écrit :
> 
> I am playing around with my unittests and there are occasions where the
> same code first does a "Try ... If Error Then ... Error.Clear" and later
> on the program has to detect if an error happened independently from that.
> 
> Here I stumbled over the behaviour of Gambas. For me I could fix it by
> checking for Error.Code <> 0 but it was not intuitive. I rubbed my eyes
> and had to get some sleep before I understood the problem.
> 
> I think it would be better to clear the flag with Error.Clear and I also
> think it would not break older code.
> 
> Alles Gute
> 
> Christof Thalhofer
> 

Done in commit 
https://gitlab.com/gambas/gambas/commit/d3fdd6fdda18656db4d6fc64c3872d5a1282ec2a.

-- 
Benoît Minisini


More information about the User mailing list