Fix thrown Error messages.

This commit is contained in:
Jürg Lehni 2011-06-17 11:26:35 +01:00
parent 9926d3f1c4
commit 1615b50b68

View file

@ -1442,7 +1442,7 @@ var Path = this.Path = PathItem.extend({
function getCurrentSegment(that) {
var segments = that._segments;
if (segments.length == 0)
throw('Use a moveTo() command first');
throw new Error('Use a moveTo() command first');
return segments[segments.length - 1];
}
@ -1506,7 +1506,7 @@ var Path = this.Path = PathItem.extend({
.subtract(to.multiply(t * t)).divide(2 * t * t1);
if (handle.isNaN())
throw new Error(
"Cannot put a curve through points with parameter=" + t);
'Cannot put a curve through points with parameter = ' + t);
this.quadraticCurveTo(handle, to);
},