- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestCustomHandleCrash (0.7 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/runtime/runtime_test.go
func TestHandleCrash(t *testing.T) { defer func() { if x := recover(); x == nil { t.Errorf("Expected a panic to recover from") } }() defer HandleCrash() panic("Test Panic") } func TestCustomHandleCrash(t *testing.T) { old := PanicHandlers defer func() { PanicHandlers = old }() var result interface{} PanicHandlers = []func(context.Context, interface{}){ func(_ context.Context, r interface{}) { result = r
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 26 16:28:45 UTC 2024 - 4.5K bytes - Viewed (0)