v0.0.545
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m6s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m6s
This commit is contained in:
parent
27cc9366b5
commit
b520282ba0
@ -13,6 +13,25 @@ var reflectTypeStr = reflect.TypeOf("")
|
|||||||
|
|
||||||
func FromError(err error) *ExErr {
|
func FromError(err error) *ExErr {
|
||||||
|
|
||||||
|
if err == nil {
|
||||||
|
// prevent NPE if we call FromError with err==nil
|
||||||
|
return &ExErr{
|
||||||
|
UniqueID: newID(),
|
||||||
|
Category: CatForeign,
|
||||||
|
Type: TypeInternal,
|
||||||
|
Severity: SevErr,
|
||||||
|
Timestamp: time.Time{},
|
||||||
|
StatusCode: nil,
|
||||||
|
Message: "",
|
||||||
|
WrappedErrType: "nil",
|
||||||
|
WrappedErr: err,
|
||||||
|
Caller: "",
|
||||||
|
OriginalError: nil,
|
||||||
|
Meta: make(MetaMap),
|
||||||
|
Extra: make(map[string]any),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//goland:noinspection GoTypeAssertionOnErrors
|
//goland:noinspection GoTypeAssertionOnErrors
|
||||||
if verr, ok := err.(*ExErr); ok {
|
if verr, ok := err.(*ExErr); ok {
|
||||||
// A simple ExErr
|
// A simple ExErr
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package goext
|
package goext
|
||||||
|
|
||||||
const GoextVersion = "0.0.544"
|
const GoextVersion = "0.0.545"
|
||||||
|
|
||||||
const GoextVersionTimestamp = "2024-11-26T15:10:27+0100"
|
const GoextVersionTimestamp = "2024-11-27T13:21:45+0100"
|
||||||
|
Loading…
Reference in New Issue
Block a user