File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -139,13 +139,14 @@ type panicHandler struct {
139
139
err error
140
140
}
141
141
142
- // recoverIfPanic recovers from panics, if any. Calls to this function
143
- // should be defferred directly: `defer ph.recoverIfPanic()`. Panic
144
- // recovery won't work if the call is wrapped in another function
145
- // call, such as `defer func() { ph.recoverIfPanic() }()`. On
146
- // recovery, API machinery panic handlers run. The implementation
147
- // follows the outline of panic recovery mechanism in
148
- // controller-runtime:
142
+ // recoverIfPanic recovers from panics, if any. Upon recovery, the
143
+ // error is set to a recovery message. Otherwise, the error is left
144
+ // unmodified. Calls to this function should be defferred directly:
145
+ // `defer ph.recoverIfPanic()`. Panic recovery won't work if the call
146
+ // is wrapped in another function call, such as `defer func() {
147
+ // ph.recoverIfPanic() }()`. On recovery, API machinery panic handlers
148
+ // run. The implementation follows the outline of panic recovery
149
+ // mechanism in controller-runtime:
149
150
// https://github.com/kubernetes-sigs/controller-runtime/blob/v0.17.3/pkg/internal/controller/controller.go#L105-L112
150
151
func (ph * panicHandler ) recoverIfPanic () {
151
152
if r := recover (); r != nil {
You can’t perform that action at this time.
0 commit comments