Improve Error message thrown when no arc can be drawn.

This commit is contained in:
Jürg Lehni 2011-06-16 22:50:59 +01:00
parent 8454709559
commit c2d425c916

View file

@ -1544,9 +1544,8 @@ var Path = this.Path = PathItem.extend({
// Otherwise we bail out:
if (!side)
return this.lineTo(to);
throw new Error(
"Cannot put an arc through the given points: "
+ Array.prototype.join.call(arguments));
throw new Error("Cannot put an arc through the given points: "
+ [from, through, to]);
}
var vector = from.subtract(center),
radius = vector.getLength(),