Excuse me. It is my custom procedure. This is it:
You also have a ShowMessage in there so either you didn't set your Application.OnException or you are running in the IDE and didn't continue the program after the GDB (debugger) gave it's exception.
If you run inside the IDE with debugging on, the GDB debugger first catches the exception and gives you a dialog. You need to click continue (or run again) to continue to your own exception handler. If you run outside the IDE only your own exception handler should fire.
If all that doesn't work... did you set the Application.OnException correctly?