Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Dumont <ddumont@gmail.com>2019-08-01 03:24:45 +0300
committerGitHub <noreply@github.com>2019-08-01 03:24:45 +0300
commit2b8399f6e607db1bb4a2335c190ec1487b04359a (patch)
tree6fa8dda195291c2c34ef301a4d44351492fd8bc6 /lib
parentaa2c489195c267b8825cec2b69bc93137cdda474 (diff)
better error message for end < start
Diffstat (limited to 'lib')
-rw-r--r--lib/torrent.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 7acad70..d484198 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -837,7 +837,7 @@ class Torrent extends EventEmitter {
if (this.destroyed) throw new Error('torrent is destroyed')
if (start < 0 || end < start || this.pieces.length <= end) {
- throw new Error('invalid selection ', start, ':', end)
+ throw new Error(`invalid selection ${start} : ${end}`)
}
priority = Number(priority) || 0