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 SetUnhandledExceptionFilte r)
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
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 SetUnhandledExceptionFilte
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
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...
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.