refactor(errorsx): autogenerate all failure names (#474)
Part of https://github.com/ooni/probe/issues/1591
This commit is contained in:
parent
8b38ea7e98
commit
5c217594d7
8 changed files with 69 additions and 56 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// Code generated by go generate; DO NOT EDIT.
|
||||
// Generated: 2021-09-07 13:05:58.447943 +0200 CEST m=+0.137110292
|
||||
// Generated: 2021-09-07 14:38:45.497503 +0200 CEST m=+0.144277376
|
||||
|
||||
package errorsx
|
||||
|
||||
|
|
@ -10,12 +10,12 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
// This enumeration lists the syscall-derived failures defined at
|
||||
// This enumeration lists the failures defined at
|
||||
// https://github.com/ooni/spec/blob/master/data-formats/df-007-errors.md
|
||||
//
|
||||
// See also the enumeration at failures.go for the failures that
|
||||
// DO NOT derive from system call errors.
|
||||
const (
|
||||
//
|
||||
// System errors
|
||||
//
|
||||
FailureOperationCanceled = "operation_canceled"
|
||||
FailureConnectionRefused = "connection_refused"
|
||||
FailureConnectionReset = "connection_reset"
|
||||
|
|
@ -44,6 +44,20 @@ const (
|
|||
FailurePermissionDenied = "permission_denied"
|
||||
FailureProtocolNotSupported = "protocol_not_supported"
|
||||
FailureWrongProtocolType = "wrong_protocol_type"
|
||||
|
||||
//
|
||||
// Library errors
|
||||
//
|
||||
FailureDNSBogonError = "dns_bogon_error"
|
||||
FailureDNSNXDOMAINError = "dns_nxdomain_error"
|
||||
FailureEOFError = "eof_error"
|
||||
FailureGenericTimeoutError = "generic_timeout_error"
|
||||
FailureQUICIncompatibleVersion = "quic_incompatible_version"
|
||||
FailureSSLFailedHandshake = "ssl_failed_handshake"
|
||||
FailureSSLInvalidHostname = "ssl_invalid_hostname"
|
||||
FailureSSLUnknownAuthority = "ssl_unknown_authority"
|
||||
FailureSSLInvalidCertificate = "ssl_invalid_certificate"
|
||||
FailureJSONParseError = "json_parse_error"
|
||||
)
|
||||
|
||||
// toSyscallErr converts a syscall error to the
|
||||
|
|
|
|||
Loading…
Reference in a new issue