NewError creates a new error from the given arguments.
(a ...any)
| 17 | |
| 18 | // NewError creates a new error from the given arguments. |
| 19 | func NewError(a ...any) error { |
| 20 | msg := fmt.Sprintln(a...) |
| 21 | return errors.New(msg) |
| 22 | } |
| 23 | |
| 24 | // Recover handles panic recovery and logs the panic error if a message is provided. |
| 25 | func Recover(msg string) any { |
no outgoing calls
no test coverage detected