diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2019-08-04 08:06:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-04 08:06:40 +0300 |
commit | e4d79e54fcc7a9a61269a2f29c7a2c343e8d8a11 (patch) | |
tree | cf1f8442a148303711990e6cb929d32b6290cc9c /lib | |
parent | 47aa5dc3ef46fccf9563761b44ad1afd2789ca02 (diff) | |
parent | 2b8399f6e607db1bb4a2335c190ec1487b04359a (diff) |
Merge pull request #1679 from ddumont/patch-1
better error message for end < start
Diffstat (limited to 'lib')
-rw-r--r-- | lib/torrent.js | 2 |
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 |