add note about calling PanicHandler first

This commit is contained in:
James Bardin 2021-10-28 13:56:18 -04:00
parent d2d2508f5c
commit bd37f43daa
1 changed files with 2 additions and 1 deletions

View File

@ -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 {