diff --git a/internal/radio/playlist.go b/internal/radio/playlist.go index 5081fd9..fa25aba 100644 --- a/internal/radio/playlist.go +++ b/internal/radio/playlist.go @@ -4,6 +4,8 @@ import ( "os" "strings" "sync" + + "github.com/pkg/errors" ) // Playlist holds a list of paths to a song files. @@ -46,7 +48,7 @@ func (p *Playlist) Next() (song string) { func (p *Playlist) load() error { data, err := os.ReadFile(p.filePath) if err != nil { - return err + return errors.Wrap(err, "cannot open a playlist file") } p.Lock() p.playlist = strings.Split(string(data), "\n")