diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-27 01:00:05 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-27 01:00:06 +0200 |
commit | 1c06ff9cac74964f60615d040f013d8eb852e17d (patch) | |
tree | 50a00da08df6f1f6fd781313828514e47bdeeafe /tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml | |
parent | 1da49d8493de7180a9db38d4614ba6fbbe898276 (diff) | |
parent | a0ad2cbdf27d0d23727b09609e127ac17e414a22 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: I73d9e896c05f7d944f3092b51a3a95c7e6e284b8
Diffstat (limited to 'tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml')
-rw-r--r-- | tests/auto/qml/qqmlpromise/data/promisehandlerthrows.qml | 17 |
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) + } +} |