I have a thread in my application which is permanently running sending heartbeat every 5 minutes to a monitoring application.
If my application fails in an exception block I need to exit the thread that is running it (the while loop is based on the thread not being interrupted).
Does this mean in every catch i will need a system exit or a call to interrupt that thread? This seems a very messy approach but I do not know how else too.
Thanks