From bd37f43daa6bdea3ed24a9d33a97e7bf468afbbf Mon Sep 17 00:00:00 2001 From: James Bardin Date: Thu, 28 Oct 2021 13:56:18 -0400 Subject: [PATCH] add note about calling PanicHandler first --- internal/logging/panic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/logging/panic.go b/internal/logging/panic.go index 9ae6252ca..2bc763f9d 100644 --- a/internal/logging/panic.go +++ b/internal/logging/panic.go @@ -28,7 +28,8 @@ shown below, and any additional information which may help replicate the issue. // PanicHandler is called to recover from an internal panic in Terraform, and // augments the standard stack trace with a more user friendly error message. -// PanicHandler must be called as a defered function. +// PanicHandler must be called as a defered function, and must be the first +// defer called at the start of a new goroutine. func PanicHandler() { recovered := recover() if recovered == nil {