return njs_function_native_frame(vm, function, this, NULL,
nargs, 0, ctor);
}
+
+ njs_type_error(vm, "%s is not a constructor",
+ njs_type_string(value->type));
+
+ return NXT_ERROR;
}
- njs_type_error(vm, "object is not callable");
+ njs_type_error(vm, "%s is not a function", njs_type_string(value->type));
return NXT_ERROR;
}
nxt_string("OKundefined") },
{ nxt_string("var a = 1; a()"),
- nxt_string("TypeError: object is not callable") },
+ nxt_string("TypeError: number is not a function") },
{ nxt_string("var o = {a:1}; o.a()"),
nxt_string("TypeError: 'a' is not a function") },
nxt_string("object") },
{ nxt_string("new decodeURI('%00')"),
- nxt_string("TypeError: object is not callable")},
+ nxt_string("TypeError: function is not a constructor")},
{ nxt_string("new ''.toString"),
- nxt_string("TypeError: object is not callable")},
+ nxt_string("TypeError: function is not a constructor")},
{ nxt_string("function F() { return Number }"
"var o = new (F())(5);"