mirror of
https://github.com/paleotronic/diskm8.git
synced 2026-04-24 12:16:30 +00:00
initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package panic
|
||||
|
||||
func Do( f func(), h func(r interface{}) ) {
|
||||
|
||||
defer func() {
|
||||
|
||||
if r := recover(); r != nil {
|
||||
h(r)
|
||||
}
|
||||
|
||||
}()
|
||||
|
||||
f()
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user