1
0
Fork 0

💡 Improved error message in path.shiftAlong

This commit is contained in:
Joost De Cock 2019-07-06 14:01:25 +02:00
parent 1c7ff10e44
commit 9f2eda43e9

View file

@ -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 */