mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
825335b2b7
This builds on top of recently introduced fscommon.ParseError. Errors returned from parsers (mostly ones used by GetStats()) are all different, and many are incomplete. For example, in many cases errors from strconv.ParseUint are returned as is, meaning there is no context telling which file we were reading. Similarly, errors from fscommon.ParseKeyValue should be wrapped to add more context. Same is true for scanner.Err(). OTOH, errors from fscommon.GetCgroup* do have enough context and there is no need to wrap them. Fix all the above. While at it, add missing scanner.Err() checks. [v2: use parseError, not ParseError] Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>