forked from prometheus/procfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/util: Read(U)intFromFile: return file name in errors
This improves error messages by adding the affected file name. This helps downstream users such as node_exporter to locate the source of errors which is useful for prometheus/node_exporter#1710. The original error is wrapped as some consumers perform checks on it. The consumers within procfs have been updated to Unwrap the error if necessary. Signed-off-by: Christian Hoffmann <[email protected]>
- Loading branch information
Showing
4 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters