v0.0.188 exerr MVP

This commit is contained in:
2023-07-24 10:42:39 +02:00
parent b1d6509294
commit 2e6ca48d22
14 changed files with 660 additions and 118 deletions

View File

@@ -13,7 +13,7 @@ const (
MethodFatal Method = "FATAL"
)
type Listener = func(method Method, v ExErr)
type Listener = func(method Method, v *ExErr)
var listenerLock = sync.Mutex{}
var listener = make([]Listener, 0)
@@ -26,7 +26,7 @@ func RegisterListener(l Listener) {
}
func (b *Builder) CallListener(m Method) {
valErr := b.toBMError()
valErr := b.errorData
listenerLock.Lock()
defer listenerLock.Unlock()