Page 2 of 2

Re: Best method for silent exception handling

Posted: Wed Dec 07, 2016 9:32 pm
by madshi
How is that data stored? Can you access it in a thread safe way?

Of course you could just ignore the danger of multi-threading and access the data directly. In most cases your exception handler will be called in the context of the main thread (if you use "trySync"), anyway.

Re: Best method for silent exception handling

Posted: Wed Dec 07, 2016 9:47 pm
by Tahtu
madshi wrote:How is that data stored? Can you access it in a thread safe way?
No.
madshi wrote:Of course you could just ignore the danger of multi-threading and access the data directly. In most cases your exception handler will be called in the context of the main thread (if you use "trySync"), anyway.
What do you mean with "trySync"? I think you mean "stTrySyncCallAlways", right?

Re: Best method for silent exception handling

Posted: Wed Dec 07, 2016 9:51 pm
by madshi
Yes, that's what I meant.

Re: Best method for silent exception handling

Posted: Wed Dec 07, 2016 9:56 pm
by Tahtu
Thank you for your assistance!

Re: Best method for silent exception handling

Posted: Thu Dec 29, 2016 9:21 am
by Tahtu
madshi wrote:What does EurekaLog do if the exception was raised by a secondary thread?
It runs in that secondary thread.
madshi wrote:Is your exception callback still called within the context of the main thread?
No.

... and the exception dialog ("MSClassics") uses the VCL.

(EurekaLog 7.5.)

Re: Best method for silent exception handling

Posted: Thu Dec 29, 2016 9:37 am
by madshi
In my tests showing a VCL form in a secondary thread resulted in all sorts of problems. The VCL simply isn't thread safe. If EurekaLog does show a VCL form in a secondary thread, I can only imagine that it can't be perfectly stable.

Re: Best method for silent exception handling

Posted: Thu Dec 29, 2016 9:50 am
by Tahtu
madshi wrote:If EurekaLog does show a VCL form in a secondary thread, I can only imagine that it can't be perfectly stable.
I agree with you: This solution of EurekaLog is bad. Your solution is much better! ... I wanted to let you know this...

Re: Best method for silent exception handling

Posted: Thu Dec 29, 2016 9:55 am
by madshi
Thanks, that's good to know! :)