[Gambas-user] Probably a really dumb question about Error

Benoît Minisini gambas at ...1...
Wed May 18 14:20:24 CEST 2016


Le 18/05/2016 12:47, richard terry a écrit :
> Hi List,
>
> I ran in to an odd problem when I used:
>
> Try whatever
> If error then
>      do-somehing
> end if
>
> Where despite Try Whatever, not generating an error, it still when on to
> the do-something. When I logged what was happening, it was carrying
> forward the last known error in my program (in this case where I'd
> tested for the existance of a particular directory).
>
> I read the docs, and it doesn't mention that one should do an
> error.clear, before a try
>
> But... If I put error.clear, before the above code, it doesn't trip the
> error, so logically it would seem to me that before every Try, one
> should do an error.clear
>
> ?is this correct.
>
> If not, could some kind sould explain to me what to do and how to user
> Error?
>
> Thanks
>
> richard
>

I would say it's not normal, but please provide some project that 
reproduces the behaviour you describe.

Regards,

-- 
Benoît Minisini




More information about the User mailing list