Tomas Hajny wrote 16 lines
On Tue, August 5, 2014 02:00, waldo kitty wrote:
>
> back in the [g]?olden days of TP6, i used to be able to set an exitproc
> procedure that would be executed any time my program exited for any
> reason...
> something like
>
> exitproc := @myexitproc;
>
> is this still able to be done easily? does it work even if there's an
> untrapped
> exception?
Yes.
Yes, as long as the exception is handled (caught) by the RTL.
do you mean that it cannot be a "unhandled exception" with ''crash'' and heaptrace dumping the thousands of left-behind memory blocks that weren't deallocated?? that's what i'm trying to get past... i want to see the error and unhandled exceptions but i really want to properly deallocate the 40000+ * 5 records on the heap instead of having to either wait for heaptrace to finish dumping them or forcibly closing the task or (in the worst cases) rebooting the entire machine...
this is a console app based on tapplication (mainly for parameter parsing capability) and i have no clue (yet) how to catch exceptions and deal with them properly...
additionally, this last time i had to deal with this, fpc 2.6.4 release for OS/2 was dieing with "unknown error 110" (IIRC) during runtime... i finally determined this to be from trying to reset a file that didn't exist where the path was pointing to... goofy error on my part that i fixed by fsplitting the pattern and adding the directory portion back to the initial directory path being used... in any case, i thought i should also mention this so that it can be corrected so it is not ""unknown"" any more ;)
NOTE: No off-list assistance is given without prior approval.
Please *keep mailing list traffic on the list* unless
private contact is specifically requested and granted.