From c3c67842ce48ce8982d8c9ebe7d4ca4fd5d57259 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Wed, 25 Sep 2019 21:01:31 -0400 Subject: [PATCH] Upload/Download update for better error handling --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 7903dd4..8df62ed 100644 --- a/main.go +++ b/main.go @@ -101,7 +101,7 @@ func uploadFile(g *gocui.Gui, fileName string, fileTitle string) { if err != nil { printToView(g, "Feed", fmt.Sprintf("There was an error uploading %s to %s", fileName, channel.Name)) } else { - printToView(g, "Feed", fmt.Sprintf("Uploaded %s to %s", fileName, channel.Name)) + printToView(g, "Feed", fmt.Sprintf("Uploaded %s to %s\n%+v", fileName, channel.Name, err)) } } func downloadFile(g *gocui.Gui, messageID int, fileName string) { @@ -110,7 +110,7 @@ func downloadFile(g *gocui.Gui, messageID int, fileName string) { if err != nil { printToView(g, "Feed", fmt.Sprintf("There was an error downloading %s from %s", fileName, channel.Name)) } else { - printToView(g, "Feed", fmt.Sprintf("Downloaded %s from %s", fileName, channel.Name)) + printToView(g, "Feed", fmt.Sprintf("Downloaded %s from %s\n%+v", fileName, channel.Name, err)) } }