Advanced features / Exceptions |
By default, WHENEVER ANY ERROR action is to CONTINUE the program flow.
fglrun.mapAnyErrorToError = true
-- FGLPROFILE env var is defined to file with: -- fglrun.mapAnyErrorToError = true MAIN DEFINE x INT WHENEVER ERROR CALL my_error_handler LET x = 1 / 0 -- error handler will be called here DISPLAY "It continues...." END MAIN FUNCTION my_error_handler() DISPLAY "Handler: ", STATUS END FUNCTION