Solved

Overriding Delphi's exception handler

Posted on 2001-07-21
3
1,452 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:hobiecat16
3 Comments
 
LVL 9

Expert Comment

by:ITugay
ID: 6304554
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.
0
 
LVL 1

Author Comment

by:hobiecat16
ID: 6304562
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...
0
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 200 total points
ID: 6304840
Get the Jedi Code Library. JclDebug is what you need.
http://www.delphi-jedi.org/Jedi:CODELIBJCL
There is also an IDE extension to compile your program with compressed MAP file included so the exception can show line numbers.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now