cli: error classification refactoring (#386)
* make errorx classifier less dependent on strings * adapt errorx tests * added syserror comment * localized classification of quic errors * localized classification of resolver errors * (fix) move "no such host" error to global classifier * moved x509 errors to local TLS error classifier * added qtls error classification for quicdialer * add Classifier to SafeErrWrapperBuilder * windows/unix specific files for errno constants * added errno ETIMEDOUT, tests * added TLS alert constants * added FailureSSLHandshake test, improved switch style * added more network based system error constants for future use * (fix) import style * (fix) errorx typos/style * (fix) robustness of SafeErrWrapperBuilder, added comments * (fix) reversed unnecessary changes, added comments * (fix) style and updated comment * errorx: added future re-structuring comment * (fix) typo TLS alert code 51 * added comment * alert mapping: added comment * Update errorx.go * Update internal/engine/netx/errorx/errorx.go Co-authored-by: Simone Basso <bassosimone@gmail.com>
This commit is contained in:
parent
1eb6e758c6
commit
1fefe5d9b8
9 changed files with 347 additions and 104 deletions
34
internal/engine/netx/errorx/errno_unix.go
Normal file
34
internal/engine/netx/errorx/errno_unix.go
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
package errorx
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
const (
|
||||
ECANCELED = unix.ECANCELED
|
||||
ECONNREFUSED = unix.ECONNREFUSED
|
||||
ECONNRESET = unix.ECONNRESET
|
||||
EHOSTUNREACH = unix.EHOSTUNREACH
|
||||
ETIMEDOUT = unix.ETIMEDOUT
|
||||
EAFNOSUPPORT = unix.EAFNOSUPPORT
|
||||
EADDRINUSE = unix.EADDRINUSE
|
||||
EADDRNOTAVAIL = unix.EADDRNOTAVAIL
|
||||
EISCONN = unix.EISCONN
|
||||
EFAULT = unix.EFAULT
|
||||
EBADF = unix.EBADF
|
||||
ECONNABORTED = unix.ECONNABORTED
|
||||
EALREADY = unix.EALREADY
|
||||
EDESTADDRREQ = unix.EDESTADDRREQ
|
||||
EINTR = unix.EINTR
|
||||
EINVAL = unix.EINVAL
|
||||
EMSGSIZE = unix.EMSGSIZE
|
||||
ENETDOWN = unix.ENETDOWN
|
||||
ENETRESET = unix.ENETRESET
|
||||
ENETUNREACH = unix.ENETUNREACH
|
||||
ENOBUFS = unix.ENOBUFS
|
||||
ENOPROTOOPT = unix.ENOPROTOOPT
|
||||
ENOTSOCK = unix.ENOTSOCK
|
||||
ENOTCONN = unix.ENOTCONN
|
||||
EWOULDBLOCK = unix.EWOULDBLOCK
|
||||
EACCES = unix.EACCES
|
||||
EPROTONOSUPPORT = unix.EPROTONOSUPPORT
|
||||
EPROTOTYPE = unix.EPROTOTYPE
|
||||
)
|
||||
Loading…
Reference in a new issue