Solved

Overriding Delphi's exception handler

Posted on 2001-07-21
3
1,454 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

929 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

15 Experts available now in Live!

Get 1:1 Help Now