refactor(netxlite/errors): improve docs and format code (#481)
No real functional change. A few are needed and they will come next. With this diff I just wanted to do cosmetic changes and documentation changes, to ensure this package is okay. See https://github.com/ooni/probe/issues/1591
This commit is contained in:
parent
323266da83
commit
a56b284b0e
11 changed files with 346 additions and 135 deletions
|
|
@ -1,2 +1,20 @@
|
|||
// Package errorsx contains code to classify errors.
|
||||
//
|
||||
// We define the ErrWrapper type, that should wrap any error
|
||||
// and map it to the corresponding OONI failure.
|
||||
//
|
||||
// See https://github.com/ooni/spec/blob/master/data-formats/df-007-errors.md
|
||||
// for a list of OONI failure strings.
|
||||
//
|
||||
// We define ClassifyXXX functions that map an `error` type to
|
||||
// the corresponding OONI failure.
|
||||
//
|
||||
// When we cannot map an error to an OONI failure we return
|
||||
// an "unknown_failure: XXX" string where the XXX part has
|
||||
// been scrubbed so to remove any network endpoints.
|
||||
//
|
||||
// The general approach we have been following for this
|
||||
// package has been to return the same strings that we used
|
||||
// with the previous measurement engine, Measurement Kit
|
||||
// available at https://github.com/measurement-kit/measurement-kit.
|
||||
package errorsx
|
||||
|
|
|
|||
Loading…
Reference in a new issue