mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-10 23:16:36 +00:00
chore: release 0.29.0.rc0 (#1600)
This commit is contained in:
18
pkg/perfdata/error.go
Normal file
18
pkg/perfdata/error.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package perfdata
|
||||
|
||||
// Error represents error returned from Performance Counters API.
|
||||
type Error struct {
|
||||
ErrorCode uint32
|
||||
errorText string
|
||||
}
|
||||
|
||||
func (m *Error) Error() string {
|
||||
return m.errorText
|
||||
}
|
||||
|
||||
func NewPdhError(code uint32) error {
|
||||
return &Error{
|
||||
ErrorCode: code,
|
||||
errorText: PdhFormatError(code),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user