From 9f2eda43e9e5383acad487da0d19b4dfee21af46 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Sat, 6 Jul 2019 14:01:25 +0200 Subject: [PATCH] :bulb: Improved error message in path.shiftAlong --- packages/core/src/path.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/path.js b/packages/core/src/path.js index 4f235fa1451..3e81e49c5ff 100644 --- a/packages/core/src/path.js +++ b/packages/core/src/path.js @@ -347,7 +347,9 @@ Path.prototype.shiftAlong = function(distance) { } current = op.to; } - throw new Error("Ran out of path to shift along"); + throw new Error( + `Error in Path.shiftAlong(): Ran out of path to shift along. Distance requested was ${distance}, path length is${this.length()}.` + ); }; /** Returns a point that lies at fraction along this */