Javatpoint Logo
Javatpoint Logo

Go Recover

Recover is used to regain control of a program from panic or error-condition. It stops the terminating sequence and resumes the normal execution. It is called from the deferred function. It retrieves the error value passed through the call of panic. Normally, it returns nil which has no other effect.

Go recover() Example


runtime error: integer divide by zero

Next TopicGo Defer

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA