MCPcopy
hub / github.com/httprunner/httprunner / GetErrorCode

Function GetErrorCode

hrp/internal/code/code.go:159–173  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

157}
158
159func GetErrorCode(err error) (errCode int) {
160 if err == nil {
161 return Success
162 }
163
164 e := errors.Cause(err)
165 if code, ok := errorsMap[e]; ok {
166 errCode = code
167 } else {
168 errCode = GeneralFail
169 }
170
171 fmt.Printf("hrp exit %d\n", errCode)
172 return
173}

Callers 14

ParseTestCasesMethod · 0.92
TestCasesToBytesMethod · 0.92
convertBoomerTaskMethod · 0.92
RunFunction · 0.92
CallRefCaseMethod · 0.92
CallRefAPIMethod · 0.92
buildHashicorpGoPluginFunction · 0.92
buildHashicorpPyPluginFunction · 0.92
forwardMethod · 0.92
loadFromCSVFunction · 0.92
loadMessageFunction · 0.92

Calls

no outgoing calls

Tested by 3

buildHashicorpGoPluginFunction · 0.74
buildHashicorpPyPluginFunction · 0.74
TestGetErrorCodeFunction · 0.68