refactor: exit with AndroidShellExecError code for adb shell failure

This commit is contained in:
lilong.129
2023-05-04 00:15:02 +08:00
parent 87cba44164
commit 247f6b9975
6 changed files with 34 additions and 16 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ func (wd *wdaDriver) WindowSize() (size Size, err error) {
// [[FBRoute GET:@"/window/size"] respondWithTarget:self action:@selector(handleGetWindowSize:)]
var rawResp rawResponse
if rawResp, err = wd.httpGET("/session", wd.sessionId, "/window/size"); err != nil {
return Size{}, err
return Size{}, errors.Wrap(err, "get window size failed with wda")
}
reply := new(struct{ Value struct{ Size } })
if err = json.Unmarshal(rawResp, reply); err != nil {