Restart application on unhandled exception

前端 未结 5 1593
天涯浪人
天涯浪人 2021-01-18 15:20

Is it possible to have a program restart automatically if it crashes?

Something like:

  1. An unhandled exception is thrown.
  2. Release all resources
5条回答
  •  日久生厌
    2021-01-18 16:11

    Like @T.E.D., we've done this in an application we built. Our application is a windows service, so the helper program stops the service (eventually kill it, if it hangs) and start the service again.

提交回复
热议问题