From b2d8c2865af57921bca48a742ace55c16134b35d Mon Sep 17 00:00:00 2001 From: deads2k Date: Wed, 11 May 2016 09:06:53 -0400 Subject: [PATCH] tolerate nil error in HandleError --- pkg/util/runtime/runtime.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/util/runtime/runtime.go b/pkg/util/runtime/runtime.go index 32b1c710abf..f404d25d194 100644 --- a/pkg/util/runtime/runtime.go +++ b/pkg/util/runtime/runtime.go @@ -67,6 +67,11 @@ var ErrorHandlers = []func(error){logError} // is preferable to logging the error - the default behavior is to log but the // errors may be sent to a remote server for analysis. func HandleError(err error) { + // this is sometimes called with a nil error. We probably shouldn't fail and should do nothing instead + if err == nil { + return + } + for _, fn := range ErrorHandlers { fn(err) }