Skip to content

Commit

Permalink
fix: use setting error
Browse files Browse the repository at this point in the history
  • Loading branch information
luohoufu committed Jan 10, 2025
1 parent 3631bd8 commit 15d2ac1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/reader/harvester/harvester.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"infini.sh/agent/lib/reader/readfile"
"infini.sh/agent/lib/reader/readfile/encoding"
"infini.sh/agent/lib/reader/readjson"
"infini.sh/framework/core/errors"
)

type Harvester struct {
Expand All @@ -30,7 +31,7 @@ type Harvester struct {
func NewHarvester(path string, offset int64) (*Harvester, error) {
f, err := readOpen(path)
if f == nil || err != nil {
return nil, err
return nil, errors.Errorf("failed to open file(%s),%v", path, err)
}
_, err = f.Seek(offset, io.SeekStart)
if err != nil {
Expand Down

0 comments on commit 15d2ac1

Please sign in to comment.