From 2b8399f6e607db1bb4a2335c190ec1487b04359a Mon Sep 17 00:00:00 2001 From: Dan Dumont Date: Wed, 31 Jul 2019 20:24:45 -0400 Subject: better error message for end < start --- lib/torrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3