diff --git a/doc/go_spec.html b/doc/go_spec.html index 18f88d5eadef99..5319d1d92fbb37 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -7641,10 +7641,13 @@

Handling panics

The recover function allows a program to manage behavior of a panicking goroutine. Suppose a function G defers a function D that calls -recover and a panic occurs in a function on the same goroutine in which G +recover and a panic occurs (i.e., panic is called) +in a function on the same goroutine in which G is executing. -When the running of deferred functions reaches D, -the return value of D's call to recover will be the value passed to the call of panic. +Subsequently, when the running of deferred functions reaches D, +the return value of D's call to recover is the value +that was previously passed to panic (i.e., at the call to panic +that caused the deferred functions to run). If D returns normally, without starting a new panic, the panicking sequence stops. In that case, the state of functions called between G and the call to panic