[Gambas-user] Global error management routine

Tobias Boege taboege at ...626...
Tue May 21 16:13:16 CEST 2013


Hi Benoit,

when programming a component in C/C++, one can use the error hook to execute
a function when the interpreter is about to abort because of an error.

In Gambas itself, we only have the local Catch blocks to execute code in
case of error in this or any context above in the stack.

However, there is no global error handling routine like the above error hook
available for Gambas programs. It would be handy if the program ultimately
has to tidy up some of its business before it is killed.

A rather dull example would be the one we initially intended: a Circular
from gb.data might be good to store program logs because it has a fixed
size. In case of an unexpected program error we would like to dump this
Circular. Easy when programming a component in C/C++ but impossible in
Gambas. AFAIK!

Thoughts?

Regards,
Tobi




More information about the User mailing list