1
votes

I have given to maintain a project in delphi for which I don't have a clue :). It was converted to XE8 from D5. So it has a lot of custom things ( I am replacing some custom Object lists with Dictionaries since Dictionaries didn't exist in D5). The main application is extending TForm and in the FormCreate method contains this line

Application.OnException := FormException;
HandleException := Application.HandleException;

The FormException method takes the exception and also prints a detailed window with some info and the call stack.

I want to integrate EurekaLog or madExcept in my project to be able to find more info on unhandled exceptions. But although installed and enabled I don't get the the window with the info I want. It runs the FromException method, although I read that when linking with madExcept this gets ignored. Creating a new project simply throwing an exception from a button click with madExcept or EurekaLog activated works properly. I don't know where to look for the exception handling of delphi, and whether I need to have more settings for 3rd party tools. Any ideas?

2
Remove those two lines of code, and follow the instructions and documentation of madExcept and EurekaLogDavid Heffernan
I did. Still it did not work. Could it be handling the exceptions somewhere else in code. Any specific call back I should look for?Apostolos
Who knows. ME works perfectly well for me. What's different in your project? A bit of debugging by bisection is what you need. Or even just old fashioned interactive debugging. Raise an exception that you know you don't handle, and step through the code to see where it goes.David Heffernan
This is what I did. Raised an unhandled exception but still it shows the default dialog box of windows/Delphi for exceptions. I know I am not providing more info because I am no delphi epxert, and the project just came in to my hands.Apostolos
It sounds like you need to do some learning in that case. Asking us to guess what the problem is does not seem very constructive. I suggest that you do some investigation and some debugging. Do you know how to debug?David Heffernan

2 Answers

0
votes

I use EurekaLog and there are a couple of cases that it doesn't capture the exceptions.

For example, if your app is multi-threaded and it is closing, threads are shutting down and it may happen that EL will not have the time to capture the exception.

You may also have configured EL to ignore specific exceptions. Check the options in the EL settings window.

Make sure that EL is configured for the type of app you have (VCL/FMX/etc.). This is the first option in the EL options windows.

Make sure that the debugger produces detailed map file (Project>Options>Compiler>Linking>Map file --> Detailed)

The last thing I can think of is EL is not properly installed. Go to Project>View Source. If EL is activated for your project, you should be able to see a number of units (EMemLeak, etc....) before the System.StartUpCopy.

BTW, which version of EL do you have?

Elpizo na boithisa...

0
votes

EurekaLog see that you have installed Application.OnException event handler and assumes that you want to handle unhandled exceptions by yourself. The similar may be true for madExcept.

If you want to use EurekaLog to handle unhandled exceptions, you can either:

See this for more details.