src/script/api/qscriptvalue.cpp
branchRCL_3
changeset 7 3f74d0d4af4c
parent 5 d3bac044e0f0
child 13 c0432d11811c
--- a/src/script/api/qscriptvalue.cpp	Mon Mar 15 12:43:09 2010 +0200
+++ b/src/script/api/qscriptvalue.cpp	Thu Apr 08 14:19:33 2010 +0300
@@ -1946,7 +1946,7 @@
     JSC::MarkedArgumentBuffer applyArgs;
     if (!array.isUndefinedOrNull()) {
         if (!array.isObject()) {
-            return d->engine->scriptValueFromJSCValue(JSC::throwError(exec, JSC::TypeError));
+            return d->engine->scriptValueFromJSCValue(JSC::throwError(exec, JSC::TypeError, "Arguments must be an array"));
         }
         if (JSC::asObject(array)->classInfo() == &JSC::Arguments::info)
             JSC::asArguments(array)->fillArgList(exec, applyArgs);
@@ -1957,8 +1957,7 @@
             for (unsigned i = 0; i < length; ++i)
                 applyArgs.append(JSC::asArray(array)->get(exec, i));
         } else {
-            Q_ASSERT_X(false, Q_FUNC_INFO, "implement me");
-//            return JSC::throwError(exec, JSC::TypeError);
+            return d->engine->scriptValueFromJSCValue(JSC::throwError(exec, JSC::TypeError, "Arguments must be an array"));
         }
     }