()
| 185 | } |
| 186 | |
| 187 | func init() { |
| 188 | baseErr := goErr.New("") |
| 189 | RegisterLeafDecoder(GetTypeKey(baseErr), decodeErrorString) |
| 190 | |
| 191 | RegisterLeafDecoder(GetTypeKey(context.DeadlineExceeded), decodeDeadlineExceeded) |
| 192 | |
| 193 | pkgE := pkgErr.New("") |
| 194 | RegisterLeafEncoder(GetTypeKey(pkgE), encodePkgFundamental) |
| 195 | |
| 196 | RegisterWrapperDecoder(GetTypeKey(pkgErr.WithMessage(baseErr, "")), decodeWithMessage) |
| 197 | |
| 198 | ws := pkgErr.WithStack(baseErr) |
| 199 | RegisterWrapperEncoder(GetTypeKey(ws), encodePkgWithStack) |
| 200 | |
| 201 | registerOsPathErrorMigration() // Needed for Go 1.16. |
| 202 | pKey := GetTypeKey(&os.PathError{}) |
| 203 | RegisterWrapperEncoder(pKey, encodePathError) |
| 204 | RegisterWrapperDecoder(pKey, decodePathError) |
| 205 | |
| 206 | pKey = GetTypeKey(&os.LinkError{}) |
| 207 | RegisterWrapperEncoder(pKey, encodeLinkError) |
| 208 | RegisterWrapperDecoder(pKey, decodeLinkError) |
| 209 | pKey = GetTypeKey(&os.SyscallError{}) |
| 210 | RegisterWrapperEncoder(pKey, encodeSyscallError) |
| 211 | RegisterWrapperDecoder(pKey, decodeSyscallError) |
| 212 | |
| 213 | RegisterLeafEncoder(GetTypeKey(&OpaqueErrno{}), encodeOpaqueErrno) |
| 214 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…