7d78e65d0c
Add semantic versioning to all services * working * Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/semver * 1.24 mod * go upgrade * tool * Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/semver
12 lines
291 B
Go
12 lines
291 B
Go
package panics
|
|
|
|
// Try executes f, catching and returning any panic it might spawn.
|
|
//
|
|
// The recovered panic can be propagated with panic(), or handled as a normal error with
|
|
// (*panics.Recovered).AsError().
|
|
func Try(f func()) *Recovered {
|
|
var c Catcher
|
|
c.Try(f)
|
|
return c.Recovered()
|
|
}
|