11 lines
240 B
Go
11 lines
240 B
Go
package kvstore
|
|
|
|
import "fmt"
|
|
|
|
func wrapRecoveredPanic(message string, panicErr any) error {
|
|
if resultErr, ok := panicErr.(error); ok {
|
|
return fmt.Errorf("%s: %w", message, resultErr)
|
|
}
|
|
return fmt.Errorf("%s: %v", message, panicErr)
|
|
}
|