[Gambas-user] catching errors
Joshua Higgins
joshiggins at ...1601...
Thu Apr 9 13:34:04 CEST 2009
Hi,
I've been using CATCH as a sort of rudimentary catch all error handling in
my code. Just got a small question about when Gambas will run this code:
Example code follows
PUBLIC SUB ihaserror()
' the error happens in here
CATCH
PRINT "OH NO!"
END
PUBLIC SUB Main()
ihaserror()
CATCH
PRINT "ERROR"
END
In this silly example, if the error happens in ihaserror(), the catch there
will print oh no. But because it was called from Main(), will the catch
there fire too so both oh no and error get printed?
--
joshua higgins
>>>>>>------
More information about the User
mailing list