Link to home
Start Free TrialLog in
Avatar of hobiecat16
hobiecat16

asked on

Overriding Delphi's exception handler

Hello,

I need to override Delphi's exception handler.
I don't want the trick with Application.OnException it is not what i need.

I'd like to set my own unhandled exception handler, in order to generate a stack dump, etc.
(using SetUnhandledExceptionFilter)

The problem is i can do what i want, setting a new exception handler doesn't override delphi's one !
I still get it's messages like "Exception EAccessViolation at adress xxx. Read at adress xxx."

I found that the exception handler is located in system.pas. Perhaps it will help...

Any idea ?

Thanks !
Bertrand
Avatar of Igor UL7AAjr
Igor UL7AAjr
Flag of Kazakhstan image

Hi hobiecat16,

did you try your app without Delphi IDE? Usually Delphi shows any exeption message first, and then your own message while IDE is running.

-----
Igor.
Avatar of hobiecat16
hobiecat16

ASKER

Yes, unfortunately this isn't the problem, i tried to run it w/o delphi's debugger and i still have the default exception handler.

Is there another way to do a stack dump than to override the exception handler ? I have an access to the exception address, perhaps i can deal with virtualProtect and ReadPhysicalMemory to read the stack ?

Any suggestion...
ASKER CERTIFIED SOLUTION
Avatar of robert_marquardt
robert_marquardt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial