//go:build !noerrtrace
// +build !noerrtrace

package errors

import (
	
)

var traceFlag int64

const (
	traceEnabled  = 0 // enabled by default
	traceDisabled = 1
)

// setTrace sets tracing flag that controls capturing caller frames.
func ( bool) {
	if  {
		atomic.StoreInt64(&traceFlag, traceEnabled)
	} else {
		atomic.StoreInt64(&traceFlag, traceDisabled)
	}
}

// enableTrace enables capturing caller frames.
//
// Intentionally left unexported.
func () { setTrace(true) }

// DisableTrace disables capturing caller frames.
func () { setTrace(false) }

// Trace reports whether caller stack capture is enabled.
func () bool {
	return atomic.LoadInt64(&traceFlag) == traceEnabled
}