feat: add trackings get error code

This commit is contained in:
lilong.129
2023-09-13 19:06:31 +08:00
parent 460d4329f6
commit f1fa87c912
2 changed files with 19 additions and 9 deletions

View File

@@ -78,16 +78,21 @@ var (
MobileUIAssertForegroundAppError = errors.New("mobile UI assert foreground app error") // 76
MobileUIAssertForegroundActivityError = errors.New("mobile UI assert foreground activity error") // 77
MobileUIPopupError = errors.New("mobile UI popup error") // 78
LoopActionNotFoundError = errors.New("loop action not found error") // 79
)
// CV related: [80, 90)
var (
CVEnvMissedError = errors.New("CV env missed error") // 80
CVRequestError = errors.New("CV prepare request error") // 81
CVServiceConnectionError = errors.New("CV service connect error") // 82
CVResponseError = errors.New("CV parse response error") // 83
CVResultNotFoundError = errors.New("CV result not found") // 84
LoopActionNotFoundError = errors.New("loop action not found error") // 85
CVEnvMissedError = errors.New("CV env missed error") // 80
CVRequestError = errors.New("CV prepare request error") // 81
CVServiceConnectionError = errors.New("CV service connect error") // 82
CVResponseError = errors.New("CV parse response error") // 83
CVResultNotFoundError = errors.New("CV result not found") // 84
)
// trackings related: [90, 100)
var (
TrackingGetError = errors.New("get trackings failed") // 90
)
var errorsMap = map[error]int{
@@ -141,6 +146,7 @@ var errorsMap = map[error]int{
MobileUIAssertForegroundAppError: 76,
MobileUIAssertForegroundActivityError: 77,
MobileUIPopupError: 78,
LoopActionNotFoundError: 79,
// OCR related
CVEnvMissedError: 80,
@@ -148,7 +154,9 @@ var errorsMap = map[error]int{
CVServiceConnectionError: 82,
CVResponseError: 83,
CVResultNotFoundError: 84,
LoopActionNotFoundError: 85,
// trackings related
TrackingGetError: 90,
}
func IsErrorPredefined(err error) bool {