A simple way to catch unhandled errors (exceptions) in a VFP application is to use the ON ERROR command near the beginning of your main program.
The following ON ERROR command calls a method in the current program called "errorHandler". The values returned by ERROR (the VFP Error Number),...