Brian Rasmusson wrote:
> Hi,
>
> would it be possible to have the application restarted automatically if
> EurekaLog detects that it is frozen? Or is it already?
>
Currently you can obtain this only using a custom ExceptionNotify event
as the following:
//------------------------------------------------------------
uses
ExceptionLog;
procedure TGUIForm.EurekaLogExceptionNotify(
EurekaExceptionRecord: TEurekaExceptionRecord; var Handled: Boolean);
begin
// Check if is a frozen exception...
if (EurekaExceptionRecord.ExceptionObject is EFrozenApplication) then
ForceApplicationTermination(tbRestart); // Force the restart!
end;
//------------------------------------------------------------
>
> Also, how do you detect it? I cannot seem to make EL think my app is frozen
> even if I do a "while(true) {}" in my program.
>
>
> Regards,
> Brian
EurekaLog detects the application frozen sending an empty message to the
Main Thread messages queue.
If the application processed this messages then it isn't frozen, yes
otherwise.
So EurekaLog cannot detect the frozen application in application without
the messages queue (as ISAPI or NT Services).
--
Best regards...
Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.