More verbose error message
authorLars Knoll <lars.knoll@digia.com>
Wed, 5 Jun 2013 23:38:16 +0000 (01:38 +0200)
committerSimon Hausmann <simon.hausmann@digia.com>
Thu, 6 Jun 2013 06:05:34 +0000 (08:05 +0200)
Also fixes one auto test.

Change-Id: I165d7f00b43ee923f1f1f84cf772afa5dae0dcd7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/qml/v4/qv4runtime.cpp

index b013f53..1444938 100644 (file)
@@ -822,8 +822,10 @@ void __qmljs_call_property(ExecutionContext *context, Value *result, const Value
 
     Value func = baseObject->get(context, name);
     FunctionObject *o = func.asFunctionObject();
-    if (!o)
-        context->throwTypeError();
+    if (!o) {
+        QString error = QString("Property '%1' of object %2 is not a function").arg(name->toQString(), thisObject.toQString());
+        context->throwTypeError(error);
+    }
 
     Value res = o->call(context, thisObject, args, argc);
     if (result)