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: // Otherwise we bail out:
if (!side) if (!side)
return this.lineTo(to); return this.lineTo(to);
throw new Error( throw new Error("Cannot put an arc through the given points: "
"Cannot put an arc through the given points: " + [from, through, to]);
+ Array.prototype.join.call(arguments));
} }
var vector = from.subtract(center), var vector = from.subtract(center),
radius = vector.getLength(), radius = vector.getLength(),