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:
authorFeross Aboukhadijeh <feross@feross.org>2019-08-04 08:06:40 +0300
committerGitHub <noreply@github.com>2019-08-04 08:06:40 +0300
commite4d79e54fcc7a9a61269a2f29c7a2c343e8d8a11 (patch)
treecf1f8442a148303711990e6cb929d32b6290cc9c /lib
parent47aa5dc3ef46fccf9563761b44ad1afd2789ca02 (diff)
parent2b8399f6e607db1bb4a2335c190ec1487b04359a (diff)
Merge pull request #1679 from ddumont/patch-1
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