Restart application on frozen exception

delphi package - automated exception handling

Restart application on frozen exception

Postby borax1974 » Tue Nov 03, 2015 12:34 pm

Hi

I wan't to restart the application as soon as it detects a frozen main thread (without a message box). All other exceptions will be handled.
I checked the "detect frozen main thread" option. How can I achieve this?

Best regards

Bora Aydemir

(Mad except 4.0.11, Delphi XE)
borax1974
 
Posts: 1
Joined: Fri Dec 26, 2014 1:32 pm

Re: Restart application on frozen exception

Postby madshi » Tue Nov 03, 2015 1:55 pm

You can install an exception handler by calling RegisterExceptionHandler(yourHandler, epQuickFiltering, stDontSync) and then in your handler you can use "if exceptIntf.Source = esAntiFreezeCheck then RestartApplication;".
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: Restart application on frozen exception

Postby oickler » Tue Nov 19, 2019 9:10 am

How to solve the problem when the application is a service?
oickler
 
Posts: 1
Joined: Tue May 28, 2019 12:20 pm

Re: Restart application on frozen exception

Postby iconic » Tue Nov 19, 2019 7:06 pm

@oickler,

Unless something has changed madExcept doesn't support RestartApplication out of the box. Madshi has answered a similar question here:

viewtopic.php?f=4&t=28417

--Iconic
iconic
Site Admin
 
Posts: 930
Joined: Wed Jun 08, 2005 5:08 am


Return to madExcept

Who is online

Users browsing this forum: No registered users and 7 guests

cron