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

Youtube For Videos Join Our Youtube Channel: Join Now


  • Send your Feedback to

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA