« get me outta code hell

Be more specific about loop-play errors - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-03-03 08:38:40 -0400
committerFlorrie <towerofnix@gmail.com>2018-03-03 08:38:40 -0400
commit8278392e00ef396abcdabc1d538bebeb20deb70c (patch)
tree799e60e95b0ac5050f8c7a7f05a33fbace0d57df
parent4ff150e42f03d51ddfed228e7da33b19eb773eaf (diff)
Be more specific about loop-play errors
-rw-r--r--src/loop-play.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/loop-play.js b/src/loop-play.js
index 9c679c7..b44e83f 100644
--- a/src/loop-play.js
+++ b/src/loop-play.js
@@ -310,7 +310,7 @@ class DownloadController extends EventEmitter {
     try {
       downloadFile = await downloader(downloaderArg)
     } catch(err) {
-      this.emit('errored', err)
+      this.emit('errored', 'Download error: ' + err)
       return
     }
 
@@ -326,7 +326,7 @@ class DownloadController extends EventEmitter {
     try {
       convertFile = await this.converter(converterOptions)(downloadFile)
     } catch(err) {
-      this.emit('errored', err)
+      this.emit('errored', 'Convert error: ' + err)
       return
     } finally {
       // Whether the convertion succeeds or not (hence 'finally'), we should