[Gambas-user] TRY bug example
Fabien Bodard
gambasfr at ...11...
Sat Dec 10 16:41:02 CET 2005
Le Samedi 10 Décembre 2005 12:54, nando a écrit :
> Thank you Benoit.
> Although I find it a bit inconsistent,
> it makes sense for the way it has been implemented.
> You have answered many questions.
> And I sincerely do thank you.
> It clears some of the fog.
>
> Perhaps do you think that CStr(False) should return F instead of NULL?
> Since PRINT "HELLO: " & ERROR & " is the error" shows T for TRUE
> then would F be a logical for False if using CSTR in the &.
> You are converting to a string.
>
> -Fernando
>
To print your error message you can use subst that use Str$ i think :
PRINT subst("HELLO: &1 is the error", ERROR)
Nevertheless ERROR is not made to be use by this way :
TRY i = 1/0
IF ERROR THEN
PRINT Error.Text
ENDIF
Error can be used in the CATCH part of the procedure too
Regards,
Fabien Bodard
More information about the User
mailing list