[Gambas-bugtracker] Bug #2556: Message.Error - Unable to load image

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Mon May 23 13:48:31 CEST 2022


http://gambaswiki.org/bugtracker/edit?object=BUG.2556&from=L21haW4-

Comment #1 by Bruce STEERS:

The error message is internal and would normally be ignored.

"Finally" is used to run code before exiting a function if there is an error.
see http://gambaswiki.org/wiki/lang/finally

If a function exits (using Return) without raising an error then Finally is not run. if there IS an error Finally is run

Catch is run ONLY if there is error raised.

Your simple events should use Catch not Finally because the code in Finally is run even though there is not an error raised.
http://gambaswiki.org/wiki/lang/catch


Public Sub Form_Open()

Print "Open form..."

 Catch   ' executed only if error is raised
   Message.Error("Error:" & Error.Text)

End




More information about the Bugtracker mailing list