mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
change: print hrp exit code
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/httprunner/httprunner/v4/hrp/cmd"
|
||||
)
|
||||
@@ -23,6 +22,5 @@ func main() {
|
||||
}()
|
||||
|
||||
exitCode := cmd.Execute()
|
||||
log.Info().Int("code", exitCode).Msg("hrp exit")
|
||||
os.Exit(exitCode)
|
||||
}
|
||||
|
||||
@@ -156,10 +156,6 @@ func IsErrorPredefined(err error) bool {
|
||||
}
|
||||
|
||||
func GetErrorCode(err error) (errCode int) {
|
||||
defer func() {
|
||||
log.Debug().Int("code", errCode).Msg("get error code")
|
||||
}()
|
||||
|
||||
if err == nil {
|
||||
return Success
|
||||
}
|
||||
@@ -170,5 +166,7 @@ func GetErrorCode(err error) (errCode int) {
|
||||
} else {
|
||||
errCode = GeneralFail
|
||||
}
|
||||
|
||||
log.Warn().Int("code", errCode).Msg("hrp exit")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user