Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
a9295bfabf | |||
12fa53d848
|
@@ -493,11 +493,12 @@ func (b *Builder) Format(level LogPrintLevel) string {
|
|||||||
// If the error is SevErr we also send it to the error-service
|
// If the error is SevErr we also send it to the error-service
|
||||||
func (b *Builder) Fatal(ctxs ...context.Context) {
|
func (b *Builder) Fatal(ctxs ...context.Context) {
|
||||||
|
|
||||||
|
b.errorData.Severity = SevFatal
|
||||||
|
|
||||||
for _, dctx := range ctxs {
|
for _, dctx := range ctxs {
|
||||||
b.CtxData(MethodFatal, dctx)
|
b.CtxData(MethodFatal, dctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
b.errorData.Severity = SevFatal
|
|
||||||
b.errorData.Log(stackSkipLogger.WithLevel(zerolog.FatalLevel))
|
b.errorData.Log(stackSkipLogger.WithLevel(zerolog.FatalLevel))
|
||||||
|
|
||||||
b.errorData.CallListener(MethodFatal)
|
b.errorData.CallListener(MethodFatal)
|
||||||
|
@@ -56,7 +56,7 @@ func wrapExErr(e *ExErr, msg string, cat ErrorCategory, stacktraceskip int) *ExE
|
|||||||
UniqueID: newID(),
|
UniqueID: newID(),
|
||||||
Category: cat,
|
Category: cat,
|
||||||
Type: TypeWrap,
|
Type: TypeWrap,
|
||||||
Severity: SevErr,
|
Severity: e.Severity,
|
||||||
Timestamp: time.Now(),
|
Timestamp: time.Now(),
|
||||||
StatusCode: e.StatusCode,
|
StatusCode: e.StatusCode,
|
||||||
Message: msg,
|
Message: msg,
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
package goext
|
package goext
|
||||||
|
|
||||||
const GoextVersion = "0.0.465"
|
const GoextVersion = "0.0.466"
|
||||||
|
|
||||||
const GoextVersionTimestamp = "2024-06-03T09:39:57+0200"
|
const GoextVersionTimestamp = "2024-06-03T13:48:30+0200"
|
||||||
|
@@ -77,6 +77,14 @@ func Coalesce4Opt[T any](v1 *T, v2 *T, v3 *T, v4 *T) *T {
|
|||||||
return v4
|
return v4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func CoalesceDblPtr[T any](v1 **T, v2 *T) *T {
|
||||||
|
if v1 != nil {
|
||||||
|
return *v1
|
||||||
|
}
|
||||||
|
|
||||||
|
return v2
|
||||||
|
}
|
||||||
|
|
||||||
func CoalesceString(s *string, def string) string {
|
func CoalesceString(s *string, def string) string {
|
||||||
if s == nil {
|
if s == nil {
|
||||||
return def
|
return def
|
||||||
|
Reference in New Issue
Block a user