aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Garrelou <simon.garrelou@gmail.com>2023-12-20 14:17:25 +0100
committerSimon Garrelou <simon.garrelou@gmail.com>2023-12-20 14:17:25 +0100
commit740dde7e412edbe139f2708ddb0fb03d261dd807 (patch)
tree59abfc7fc6b4e7e6171ffc494760cdcb97d671a4
parenta8a457df1cfa03ebde0ceb79476aabab5ae2d340 (diff)
downloadtermsonic-740dde7e412edbe139f2708ddb0fb03d261dd807.tar.gz
termsonic-740dde7e412edbe139f2708ddb0fb03d261dd807.zip
remove panic(), add error logging instead
-rw-r--r--src/page_artists.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/page_artists.go b/src/page_artists.go
index 02d768a..0b5a0be 100644
--- a/src/page_artists.go
+++ b/src/page_artists.go
@@ -31,7 +31,9 @@ func (a *app) artistsPage() tview.Primitive {
31 if node.GetChildren() != nil || len(node.GetChildren()) == 0 { 31 if node.GetChildren() != nil || len(node.GetChildren()) == 0 {
32 artist, err := a.sub.GetMusicDirectory(sel.id) 32 artist, err := a.sub.GetMusicDirectory(sel.id)
33 if err != nil { 33 if err != nil {
34 panic(err) 34 LogErrorf("loading album '%s': %v", sel.id, err)
35 a.alert("Error: %v", err)
36 return
35 } 37 }
36 38
37 for _, album := range artist.Child { 39 for _, album := range artist.Child {