diff options
author | Rainer Keller <Rainer.Keller@qt.io> | 2018-07-02 11:47:58 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-02 13:42:14 +0000 |
commit | 22ef109ccdc64e0f9afb82b1b7b3d4c39e31a5ab (patch) | |
tree | 293c06682513c5d29602b5441a4db0c0316d4714 /src | |
parent | 260e165993fe15a1668cfd36caee18a95b2d2f59 (diff) |
Improve error message
Change-Id: I29b9a35c080c50469ac1a3ff5f83a31349e801ad
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 23170ace92..5f8b7d31ca 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -487,8 +487,10 @@ Heap::Object *RuntimeHelpers::convertToObject(ExecutionEngine *engine, const Val Q_ASSERT(!value.isObject()); switch (value.type()) { case Value::Undefined_Type: + engine->throwTypeError(QLatin1String("Value is undefined and could not be converted to an object")); + return nullptr; case Value::Null_Type: - engine->throwTypeError(); + engine->throwTypeError(QLatin1String("Value is null and could not be converted to an object")); return nullptr; case Value::Boolean_Type: return engine->newBooleanObject(value.booleanValue()); |