-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy patherror_codes.go
More file actions
46 lines (33 loc) · 2.02 KB
/
error_codes.go
File metadata and controls
46 lines (33 loc) · 2.02 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package cronet
// ErrorCode represents the error code returned by cronet.
type ErrorCode int
const (
// ErrorCodeErrorCallback indicating the error returned by app callback.
ErrorCodeErrorCallback ErrorCode = 0
// ErrorCodeErrorHostnameNotResolved indicating the host being sent the request could not be resolved to an IP address.
ErrorCodeErrorHostnameNotResolved ErrorCode = 1
// ErrorCodeErrorInternetDisconnected indicating the device was not connected to any network.
ErrorCodeErrorInternetDisconnected ErrorCode = 2
// ErrorCodeErrorNetworkChanged indicating that as the request was processed the network configuration changed.
ErrorCodeErrorNetworkChanged ErrorCode = 3
// ErrorCodeErrorTimedOut indicating a timeout expired. Timeouts expiring while attempting to connect will
// be reported as the more specific ErrorCodeErrorConnectionTimedOut.
ErrorCodeErrorTimedOut ErrorCode = 4
// ErrorCodeErrorConnectionClosed indicating the connection was closed unexpectedly.
ErrorCodeErrorConnectionClosed ErrorCode = 5
// ErrorCodeErrorConnectionTimedOut indicating the connection attempt timed out.
ErrorCodeErrorConnectionTimedOut ErrorCode = 6
// ErrorCodeErrorConnectionRefused indicating the connection attempt was refused.
ErrorCodeErrorConnectionRefused ErrorCode = 7
// ErrorCodeErrorConnectionReset indicating the connection was unexpectedly reset.
ErrorCodeErrorConnectionReset ErrorCode = 8
// ErrorCodeErrorAddressUnreachable indicating the IP address being contacted is unreachable,
// meaning there is no route to the specified host or network.
ErrorCodeErrorAddressUnreachable ErrorCode = 9
// ErrorCodeErrorQuicProtocolFailed indicating an error related to the QUIC protocol.
// When Error.ErrorCode() is this code, see Error.QuicDetailedErrorCode() for more information.
ErrorCodeErrorQuicProtocolFailed ErrorCode = 10
// ErrorCodeErrorOther indicating another type of error was encountered.
// Error.InternalErrorCode() can be consulted to get a more specific cause.
ErrorCodeErrorOther ErrorCode = 11
)