Write your code in a way that panics don’t occur…
Though you can use defer and recover to “catch” a panic. Wont give you much when you do it in main though, as it will exit anyway (at the point when the defered function is called, then main is already left…
You can not just restart your program or continue after the try/catch block as you would in many other languages.