mirror of
https://github.com/samber/lo.git
synced 2026-04-22 23:47:11 +08:00
843 B
843 B
name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
| name | slug | sourceRef | category | subCategory | playUrl | variantHelpers | similarHelpers | position | signatures | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TryCatchWithErrorValue | trycatchwitherrorvalue | errors.go#L343 | core | error-handling | https://go.dev/play/p/8Pc9gwX_GZO |
|
|
60 |
|
Calls the catch function with the error value when the callback errors or panics.
lo.TryCatchWithErrorValue(
func() error {
panic("error")
},
func(val any) {
fmt.Println(val)
},
)