copy bmerr stuff from bm

This commit is contained in:
2023-02-08 18:45:31 +01:00
parent fd33b43f31
commit 17383894a7
9 changed files with 1077 additions and 0 deletions

17
exerr/errinit.go Normal file
View File

@@ -0,0 +1,17 @@
package exerr
type ErrorPackageConfig struct {
LogTraces bool
RecursiveErrors bool
}
var pkgconfig = ErrorPackageConfig{
LogTraces: true,
}
// Init initializes the exerr packages
// Must be called at the program start, before (!) any errors
// Is not thread-safe
func Init(cfg ErrorPackageConfig) {
pkgconfig = cfg
}