1

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?

11
  • Remove those two lines of code, and follow the instructions and documentation of madExcept and EurekaLog Mar 11, 2016 at 9:14
  • 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
    Mar 11, 2016 at 10:25
  • 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. Mar 11, 2016 at 10:31
  • 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
    Mar 11, 2016 at 10:56
  • 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? Mar 11, 2016 at 10:59

2 Answers 2

0

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...

1
  • Hello John...it's latest trial 7.x. I will try your recommendations. Eureka or mad exept both work when creating my own project. So I am sure something's wrong with that specific project. I have disabled custom exception handling but still the same problem. Pantws se euxaristw!
    – Apostolos
    Mar 12, 2016 at 17:14
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.