diff options
author | Dan Dumont <ddumont@gmail.com> | 2019-08-01 03:24:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 03:24:45 +0300 |
commit | 2b8399f6e607db1bb4a2335c190ec1487b04359a (patch) | |
tree | 6fa8dda195291c2c34ef301a4d44351492fd8bc6 /lib | |
parent | aa2c489195c267b8825cec2b69bc93137cdda474 (diff) |
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 |