Unhandled panic

I want a mechanism by which any unhandled panic (from golang code) does not bring down my application process. At the moment any downstream panic(s) raised by my golang code will freeze/crash my application. How do I gracefully handle all panic(s) and still continue to serve my client applications?

In your main program “loop” use the regular deferring mechanism to handle panics, shut down, restart.

Alternatively just crash and let your supervising process deal with the restart.

1 Like

Thank you. Will do.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.