diff --git a/src/CanvasRenderingContext2d.cc b/src/CanvasRenderingContext2d.cc index b9dc3a0..5233418 100644 --- a/src/CanvasRenderingContext2d.cc +++ b/src/CanvasRenderingContext2d.cc @@ -1497,9 +1497,9 @@ Context2d::LineTo(const Arguments &args) { HandleScope scope; if (!args[0]->IsNumber()) - return ThrowException(Exception::TypeError(String::New("x required"))); + return ThrowException(Exception::TypeError(String::New("lineTo() x must be a number"))); if (!args[1]->IsNumber()) - return ThrowException(Exception::TypeError(String::New("y required"))); + return ThrowException(Exception::TypeError(String::New("lineTo() y must be a number"))); Context2d *context = ObjectWrap::Unwrap(args.This()); cairo_line_to(context->context() @@ -1518,9 +1518,9 @@ Context2d::MoveTo(const Arguments &args) { HandleScope scope; if (!args[0]->IsNumber()) - return ThrowException(Exception::TypeError(String::New("x required"))); + return ThrowException(Exception::TypeError(String::New("moveTo() x must be a number"))); if (!args[1]->IsNumber()) - return ThrowException(Exception::TypeError(String::New("y required"))); + return ThrowException(Exception::TypeError(String::New("moveTo() y must be a number"))); Context2d *context = ObjectWrap::Unwrap(args.This()); cairo_move_to(context->context()