PDA

View Full Version : Multi threaded exceptions not catched


Teasy
05-May-2011, 08:45 AM
Hi,

I downloaded Eurekalog for evaluation purposes.
Although Eurekalog works fine in a single threaded application, in our multi-threaded application exceptions aren't catched.

When the main thread fires an exception Eurekalog steps in, but when the second thread fires an exception it is not handled.

The second thread is started in the main thread in a try except block.
So, how do I 'tell' Eurekalog to catch all the exceptions?

FYI the application is nothing more than a dpr file which calls several bpl's.

Tia,

Filip.

Alex
06-May-2011, 10:16 AM
Hi,

May be I don't understand you properly, but you're saying that you've set up try-except handler. Of course, EurekaLog will not fire, since you explicitly handle exceptions.

If you want to fire EurekaLog inside except block - use this code:

try
...
except
...
StandardEurekaNotify(GetLastExceptionObject, GetLastExceptionAddress);
end;

Teasy
09-May-2011, 07:07 AM
Hi Alex,

Thanks for your reply.

I have indeed a try except block, but even when I re-raise the exception Eurekalog doesn't step in.

Second issue: my threads are handled in a bpl, so adding a StandardEurekaNotify gives a compiler error that I "cannot use the Eurekalog package in other packages."

Is there a workaround for that?

Tia,

Filip.

roberto.hamada
10-May-2011, 10:30 PM
Hi,

I am with the same problem. In version 6.0.13 this feature worked well.

roberto.hamada
10-May-2011, 11:05 PM
HI,

I tested version 6.1.01 and when an exception occurs in the main thread, EurekaLog did not capture all running threads.
In version 6.0.24 the main thread, this is still working.

Alex
11-May-2011, 11:25 AM
Hi,

Second issue: my threads are handled in a bpl, so adding a StandardEurekaNotify gives a compiler error that I "cannot use the Eurekalog package in other packages."

Is there a workaround for that?

Yes, it does. Remove any references EurekaLog package from your project.

EurekaLog package contains IDE expert. It should not be used in your application.

I have indeed a try except block, but even when I re-raise the exception Eurekalog doesn't step in.

I am with the same problem. In version 6.0.13 this feature worked well.

Can you send us a sample demo application to illustrate this? I can't figure out what your problem is from your description.