-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherrors.go
More file actions
32 lines (30 loc) · 1.88 KB
/
errors.go
File metadata and controls
32 lines (30 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package adb
import (
"errors"
)
var (
// ErrStdoutEmpty is returned when an execution should have data but has none.
ErrStdoutEmpty = errors.New("stdout expected to contain data but was empty")
// ErrNotInstalled is returned when adb cannot be found in PATH.
ErrNotInstalled = errors.New("adb is not installed or not in PATH")
// ErrCoordinatesNotFound is returned when touch event coordinates are missing.
ErrCoordinatesNotFound = errors.New("coordinates for an input event are missing")
// ErrConnUSB is returned when connect/disconnect is called on a USB device.
ErrConnUSB = errors.New("cannot call connect/disconnect to device using USB")
// ErrResolutionParseFail is returned when screen resolution output cannot be parsed.
ErrResolutionParseFail = errors.New("failed to parse screen size from input text")
// ErrDestExists is returned when a pull destination file already exists.
ErrDestExists = errors.New("destination file already exists")
// ErrDeviceNotFound is returned when no device is connected or the target device cannot be found.
ErrDeviceNotFound = errors.New("device not found")
// ErrDeviceOffline is returned when the target device is offline.
ErrDeviceOffline = errors.New("device offline")
// ErrDeviceUnauthorized is returned when the device has not authorized USB debugging.
ErrDeviceUnauthorized = errors.New("device unauthorized; check the confirmation dialog on the device")
// ErrConnectionRefused is returned when the connection to a device is refused.
ErrConnectionRefused = errors.New("connection refused")
// ErrMoreThanOneDevice is returned when multiple devices are connected and no serial is specified.
ErrMoreThanOneDevice = errors.New("more than one device/emulator; use -s to specify a device")
// ErrUnspecified is returned when the exact error cannot be determined.
ErrUnspecified = errors.New("an unknown error has occurred, please open an issue on GitHub")
)