[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


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.

Public Sub Form_Open()

Print "Open form..."

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


More information about the Bugtracker mailing list