resolvepanic moved to util.ResolvePanic

This commit is contained in:
DarkGopher 2025-06-17 18:50:59 +02:00
parent 77101ac9b4
commit 0a74eadccb
6 changed files with 85 additions and 18 deletions

9
util/panic.go Normal file
View file

@ -0,0 +1,9 @@
package util
// ResolvePanic convert panic recover to error This used
// for map[any]any value manipulations when get panic
func ResolvePanic(err *error) {
if r := recover(); r != nil {
*err = r.(error)
}
}