aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-27 01:00:05 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-27 01:00:06 +0200
commit1c06ff9cac74964f60615d040f013d8eb852e17d (patch)
tree50a00da08df6f1f6fd781313828514e47bdeeafe /tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml
parent1da49d8493de7180a9db38d4614ba6fbbe898276 (diff)
parenta0ad2cbdf27d0d23727b09609e127ac17e414a22 (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14
Diffstat (limited to 'tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml')
-rw-r--r--tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml b/tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml
new file mode 100644
index 0000000000..d23ea43e74
--- /dev/null
+++ b/tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml
@@ -0,0 +1,17 @@
+import QtQuick 2.12
+
+Item {
+ id: root
+ property string errorMessage
+ Component.onCompleted: () => {
+ let prom = Promise.reject("Some error")
+ .then(
+ o => {console.log("Never reached");},
+ err => {
+ console.log("Rethrowing err");
+ throw err;
+ }
+ )
+ .catch(err => root.errorMessage = err)
+ }
+}