mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
25 lines
347 B
Go
25 lines
347 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/getsentry/sentry-go"
|
|
|
|
"github.com/httprunner/httprunner/v4/hrp/cmd"
|
|
)
|
|
|
|
func main() {
|
|
defer func() {
|
|
if err := recover(); err != nil {
|
|
// report panic to sentry
|
|
sentry.CurrentHub().Recover(err)
|
|
sentry.Flush(time.Second * 5)
|
|
|
|
// print panic trace
|
|
panic(err)
|
|
}
|
|
}()
|
|
|
|
cmd.Execute()
|
|
}
|